Fix problem with focusing in `C-o' in ibuffer in some circumstances

* 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).
This commit is contained in:
Miha Rihtaršič 2021-05-18 17:08:58 +02:00 committed by Lars Ingebrigtsen
parent ab20f385a7
commit 304a3b9ee8

View 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 ()