Fix delete-other-windows from inside popups

Occasionally, a window will lose its popup status, but not its special
window parameters, forcing non-popups to be treated like popups when
delete-other-windows is called.
This commit is contained in:
Henrik Lissner 2018-12-06 16:01:10 -05:00
parent c71a73e43b
commit 745bd3238c
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -72,11 +72,10 @@ the buffer is visible, then set another timer and try again later."
buffer ttl))))))))))
(defun +popup--delete-other-windows (window)
"Called in lieu of `delete-other-windows' in popup windows.
Raises WINDOW (assumed to be a popup), then deletes other windows."
(when-let* ((window (+popup/raise window)))
(delete-other-windows window))
"Fixes `delete-other-windows' when used from a popup window."
(when-let* ((window (ignore-errors (+popup/raise window))))
(let ((ignore-window-parameters t))
(delete-other-windows window)))
nil)
(defun +popup--normalize-alist (alist)