Fix +popup/raise not raising some windows

The command now raises the popup into the previously selected window,
unless the prefix argument is used.
This commit is contained in:
Henrik Lissner 2019-09-20 23:54:17 -04:00
parent e10cd8cf2e
commit 2de198e749
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -412,9 +412,11 @@ the message buffer in a popup window."
t)
;;;###autoload
(defun +popup/raise (window)
"Raise the current popup window into a regular window."
(interactive (list (selected-window)))
(defun +popup/raise (window &optional arg)
"Raise the current popup window into a regular window.
If prefix ARG, raise the current popup into a new window."
(interactive
(list (selected-window) current-prefix-arg))
(cl-check-type window window)
(unless (+popup-window-p window)
(user-error "Cannot raise a non-popup window"))
@ -422,7 +424,9 @@ the message buffer in a popup window."
(+popup--inhibit-transient t)
+popup--remember-last)
(+popup/close window 'force)
(display-buffer-pop-up-window buffer nil)))
(if arg
(pop-to-buffer buffer)
(switch-to-buffer buffer))))
;;;###autoload
(defun +popup/diagnose ()