mu4e-headers: fix updated check (for auto-update)

The check for # of updated messages was wrong; fix it.

Fixes: #2163.
This commit is contained in:
Dirk-Jan C. Binnema
2021-10-26 14:13:34 +03:00
parent 3422bf9da2
commit bd40ffa718

View File

@ -1116,11 +1116,11 @@ after the end of the search results."
(defun mu4e~headers-maybe-auto-update () (defun mu4e~headers-maybe-auto-update ()
"Update the current headers buffer after indexing has brought "Update the current headers buffer after indexing has brought
some changes, `mu4e-headers-auto-update' is non-nil and there some changes, `mu4e-headers-auto-update' is non-nil and there is
is no user-interaction ongoing." no user-interaction ongoing."
(when (and mu4e-headers-auto-update ;; must be set (when (and mu4e-headers-auto-update ;; must be set
mu4e-index-update-status mu4e-index-update-status
(> 0 (plist-get mu4e-index-update-status :updated)) (not (zerop (plist-get mu4e-index-update-status :updated)))
(zerop (mu4e-mark-marks-num)) ;; non active marks (zerop (mu4e-mark-marks-num)) ;; non active marks
(not (active-minibuffer-window))) ;; no user input only (not (active-minibuffer-window))) ;; no user input only
;; rerun search if there's a live window with search results; ;; rerun search if there's a live window with search results;