Only remove mark overlays in `mu4e-mark-at-point`

This prevent deleting overlays added by third party packages working as well
with overlays in mu4e-headers e.g. thread-folding , and probably in mu4e
itself as well with future features.  Also having a named overlay allows in
future features to modify any other overlays but these one.

As it is this patch doesn't modify the actual behavior.
This commit is contained in:
Thierry Volpiatto 2021-06-10 14:19:22 +02:00
parent 047c10453a
commit 89538ef4fc
No known key found for this signature in database
GPG Key ID: 08FDB07A7433A7F2
1 changed files with 4 additions and 2 deletions

View File

@ -266,8 +266,8 @@ The following marks are available, and the corresponding props:
;; update the hash -- remove everything current, and if add the new
;; stuff, unless we're unmarking
(remhash docid mu4e~mark-map)
;; remove possible overlays
(remove-overlays (line-beginning-position) (line-end-position))
;; remove possible mark overlays
(remove-overlays (line-beginning-position) (line-end-position) 'mmark t)
;; now, let's set a mark (unless we were unmarking)
(unless (eql mark 'unmark)
(puthash docid (cons mark target) mu4e~mark-map)
@ -282,6 +282,8 @@ The following marks are available, and the corresponding props:
(mu4e~headers-goto-docid docid t)))
(overlay (make-overlay start (+ start (length targetstr)))))
(overlay-put overlay 'display targetstr)
(overlay-put overlay 'mmark t)
(overlay-put overlay 'evaporate t)
docid)))))))
(defun mu4e~mark-get-move-target ()