mu4e-headers: restore mark after update

Works-around, fixes: #2076.
This commit is contained in:
Dirk-Jan C. Binnema 2021-08-25 22:54:47 +03:00
parent 8734e09563
commit e6bfdda2fe
1 changed files with 6 additions and 2 deletions

View File

@ -383,8 +383,8 @@ headers."
(let* ((docid (mu4e-message-field msg :docid))
(initial-message-at-point (mu4e~headers-docid-at-point))
(initial-column (current-column))
(point (mu4e~headers-docid-pos docid)))
(point (mu4e~headers-docid-pos docid))
(markinfo (gethash docid mu4e~mark-map)))
(when point ;; is the message present in this list?
;; if it's marked, unmark it now
@ -415,6 +415,10 @@ headers."
(unless is-move
(mu4e~headers-header-handler msg point))
;; restore the mark, if any. See #2076.
(when (and markinfo (mu4e~headers-goto-docid docid))
(mu4e-mark-at-point (car markinfo) (cdr markinfo)))
(if (and initial-message-at-point
(mu4e~headers-goto-docid initial-message-at-point))
(progn