emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 611b85b: Tweak how Man selects the previous window on failure


From: Lars Ingebrigtsen
Subject: master 611b85b: Tweak how Man selects the previous window on failure
Date: Mon, 21 Sep 2020 09:06:11 -0400 (EDT)

branch: master
commit 611b85b66366961dfcf53885438771b30569ffe0
Author: Juri Linkov <juri@linkov.net>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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).
---
 lisp/man.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/man.el b/lisp/man.el
index 1a82b12..5ee60ca 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]