about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-08-16T12·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-08-16T12·00+0000
commit633065ad55f84431db6aa380dc2467c38b5fbdcb (patch)
tree3f8230d5051798847e80b4f41ba0f35cb1581e18 /exwm-layout.el
parent11fecb5186ceac31aa4a78261da3969ddb6856ff (diff)
Don't assume order of `get-buffer-window-list' results
It only guarantees that the first result *if* the buffer appears on the
selected window.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 18c2c27e22a0..8f3c47f69314 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -306,8 +306,10 @@ selected by `other-buffer'."
                 ;; windows displaying an EXWM-buffer now displayed elsewhere; we
                 ;; need to display with some other buffer there.
                 (setq vacated-windows
-                      (append vacated-windows (cdr (get-buffer-window-list
-                                                    (current-buffer) 'nomini t))))
+                      (append vacated-windows (remove
+                                               window
+                                               (get-buffer-window-list
+                                                (current-buffer) 'nomini t))))
                 ;; Note down when an EXWM-buffer is being covered by this
                 ;; buffer; we don't want it to reappear in some vacated window.
                 (let ((prev-buffer (car-safe