Tweak how Man selects the previous window on failure

* lisp/man.el (Man-bgproc-sentinel): Ensure that we select the
correct previous window (bug#38164).
This commit is contained in:
Juri Linkov 2020-09-21 15:05:55 +02:00 committed by Lars Ingebrigtsen
parent 462dbc1cb2
commit 611b85b663

View file

@ -1508,8 +1508,11 @@ manpage command."
(when delete-buff
(if (window-live-p (get-buffer-window Man-buffer t))
(quit-restore-window
(get-buffer-window Man-buffer t) 'kill)
(progn
(quit-restore-window
(get-buffer-window Man-buffer t) 'kill)
;; Ensure that we end up in the correct window.
(select-window (old-selected-window)))
(kill-buffer Man-buffer)))
(when message