]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix problem with focusing in `C-o' in ibuffer in some circumstances
authorMiha Rihtaršič <miha@kamnitnik.top>
Tue, 18 May 2021 15:08:58 +0000 (17:08 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 18 May 2021 15:08:58 +0000 (17:08 +0200)
* lisp/ibuffer.el (ibuffer-visit-buffer-other-window-noselect):
Use display-buffer instead of pop-to-buffer and selecting the old
window.  `pop-to-buffer' focuses the new frame, but
`select-window' usually fails to focus the original frame.  This
simple patch fixes that (bug#48218).

lisp/ibuffer.el

index b484dd717ca9bf543172a3465cbcc19a11da96a7..c80222ed0f40edb1cca0b695e14e58254d1105bf 100644 (file)
@@ -988,9 +988,7 @@ one window."
   (let ((buf (ibuffer-current-buffer t)))
     (bury-buffer (current-buffer))
     (if noselect
-       (let ((curwin (selected-window)))
-         (pop-to-buffer buf)
-         (select-window curwin))
+        (display-buffer buf)
       (switch-to-buffer-other-window buf))))
 
 (defun ibuffer-visit-buffer-other-window-noselect ()