mu4e-headers: don't auto-update header with message open

Avoid removing a message that's potentially being looked at.

Fixes #1055
Fixes #1981
This commit is contained in:
Dirk-Jan C. Binnema 2023-08-03 23:39:18 +03:00
parent a71b4f5e8d
commit 0ace413f80
1 changed files with 1 additions and 0 deletions

View File

@ -1079,6 +1079,7 @@ some changes, `mu4e-headers-auto-update' is non-nil and there is
no user-interaction ongoing."
(when (and mu4e-headers-auto-update ;; must be set
mu4e-index-update-status
(not (mu4e-get-view-buffer)) ;; not when viewing a message
(not (zerop (plist-get mu4e-index-update-status :updated)))
;; NOTE: `mu4e-mark-marks-num' can return nil. Is that intended?
(zerop (or (mu4e-mark-marks-num) 0)) ;; non active marks