mu4e-view: remove overlays before erasing

erase-buffer is not enough, and [1][2] can stay behind in the buffer.
This commit is contained in:
Dirk-Jan C. Binnema 2021-08-30 10:13:06 +03:00
parent 6d555b3a6c
commit 4404a57365
2 changed files with 2 additions and 0 deletions

View File

@ -549,6 +549,7 @@ Also number them so they can be opened using `mu4e-view-go-to-url'."
keymap ,mu4e-view-active-urls-keymap
help-echo
"[mouse-1] or [M-RET] to open the link"))
(overlay-put ov 'mu4e-overlay t)
(overlay-put ov 'after-string
(propertize (format "\u200B[%d]" num)
'face 'mu4e-url-number-face)))))))))

View File

@ -54,6 +54,7 @@
(kill-buffer gnus-article-buffer))
(with-current-buffer (get-buffer-create gnus-article-buffer)
(let ((inhibit-read-only t))
(remove-overlays (point-min) (point-max) 'mu4e-overlay t)
(erase-buffer)
(insert-file-contents-literally
(mu4e-message-field msg :path) nil nil nil t)))