mu4e-headers: avoid showing up in the wrong frame
Don't switch buffers for background searches, that might show up in the wrong frame. This hopefully helps for #2766.
This commit is contained in:
@ -820,9 +820,11 @@ Switch to the output buffer for the results."
|
|||||||
list-buffers-directory expr)
|
list-buffers-directory expr)
|
||||||
(mu4e--modeline-update))
|
(mu4e--modeline-update))
|
||||||
|
|
||||||
;; when the buffer is already visible, select it; otherwise,
|
;; For interactive searches, display the buffer if not already visible; for
|
||||||
;; switch to it.
|
;; background (auto-update) searches, never switch buffers as that can pop
|
||||||
(unless (get-buffer-window buf (if mu4e--search-background 0 nil))
|
;; up the headers buffer in the wrong frame. #2766.
|
||||||
|
(when (and (not mu4e--search-background)
|
||||||
|
(not (get-buffer-window buf)))
|
||||||
(mu4e-display-buffer buf t))
|
(mu4e-display-buffer buf t))
|
||||||
(run-hook-with-args 'mu4e-search-hook expr)
|
(run-hook-with-args 'mu4e-search-hook expr)
|
||||||
(mu4e~headers-clear mu4e~search-message)
|
(mu4e~headers-clear mu4e~search-message)
|
||||||
|
|||||||
Reference in New Issue
Block a user