fix(popup): cycle windows with no-other-window property

Previously, +popup/other would do nothing if a window with the
no-other-window property that was not a popup was focused. Now
+popup/other will always select different window if there is another
popup or window with the no-other-window property.

Fix: #7119
This commit is contained in:
StrawberryTea 2023-07-24 13:18:53 -04:00 committed by GitHub
parent 37f4653f5e
commit 177157b044
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -355,7 +355,8 @@ Any non-nil value besides the above will be used as the raw value for
;; parameter, since `other-window' won't. ;; parameter, since `other-window' won't.
(window-parameter w 'no-other-window))) (window-parameter w 'no-other-window)))
(window-list))) (window-list)))
(select-window (if (+popup-window-p) (select-window (if (or (+popup-window-p)
(window-parameter nil 'no-other-window))
(let ((window (selected-window))) (let ((window (selected-window)))
(or (car-safe (cdr (memq window popups))) (or (car-safe (cdr (memq window popups)))
(car (delq window popups)) (car (delq window popups))