* lisp/window.el (quit-restore-window): Select previously selected window.
After deleting the dedicated window, such as a window with *Completions* buffer, select the previously selected window, like most of other 'cond' branches do in this function (bug#52491).
This commit is contained in:
parent
b7d31d6192
commit
9bcb732686
1 changed files with 4 additions and 1 deletions
|
@ -5167,7 +5167,10 @@ nil means to not handle the buffer in a particular way. This
|
|||
(cond
|
||||
;; First try to delete dedicated windows that are not side windows.
|
||||
((and dedicated (not (eq dedicated 'side))
|
||||
(window--delete window 'dedicated (eq bury-or-kill 'kill))))
|
||||
(window--delete window 'dedicated (eq bury-or-kill 'kill)))
|
||||
;; If the previously selected window is still alive, select it.
|
||||
(when (window-live-p (nth 2 quit-restore))
|
||||
(select-window (nth 2 quit-restore))))
|
||||
((and (not prev-buffer)
|
||||
(eq (nth 1 quit-restore) 'tab)
|
||||
(eq (nth 3 quit-restore) buffer))
|
||||
|
|
Loading…
Add table
Reference in a new issue