From aebec9714bbe629a46ab10d697c14e5bb1479ef5 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 31 Oct 2021 11:42:50 +0200 Subject: [PATCH] mu4e-headers: save-excursion when updating message Otherwise, the updated header may end up in the wrong buffer. Fixes: #2172. --- mu4e/mu4e-headers.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index b7485c56..53542d7f 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -745,7 +745,7 @@ headers." ;; update it; that way, the flags can be updated, as well as the path ;; (which is useful for viewing the raw message) (when (and maybe-view (mu4e~headers-view-this-message-p docid)) - (mu4e-view msg)) + (save-excursion (mu4e-view msg))) ;; now, if this update was about *moving* a message, we don't show it ;; anymore (of course, we cannot be sure if the message really no ;; longer matches the query, but this seem a good heuristic. if it