summaryrefslogtreecommitdiff
path: root/mu4e
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2026-03-18 05:09:32 +0200
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2026-03-18 05:09:32 +0200
commitead584a578704d7d66c02a29d480a5ad17311541 (patch)
tree083209e758fb4c066218b60b5531c9d675965969 /mu4e
parent60cf77b8c2b12da327aaa92ea27ad7e3a1752c73 (diff)
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.
Diffstat (limited to 'mu4e')
-rw-r--r--mu4e/mu4e-headers.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el
index 28c0dc2..408b120 100644
--- a/mu4e/mu4e-headers.el
+++ b/mu4e/mu4e-headers.el
@@ -820,9 +820,11 @@ Switch to the output buffer for the results."
list-buffers-directory expr)
(mu4e--modeline-update))
- ;; when the buffer is already visible, select it; otherwise,
- ;; switch to it.
- (unless (get-buffer-window buf (if mu4e--search-background 0 nil))
+ ;; For interactive searches, display the buffer if not already visible; for
+ ;; background (auto-update) searches, never switch buffers as that can pop
+ ;; 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))
(run-hook-with-args 'mu4e-search-hook expr)
(mu4e~headers-clear mu4e~search-message)