diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-08-29 21:38:45 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-08-29 21:40:42 +0300 |
| commit | 42f2e73025d9000e958d31687bb17edf3ef787c1 (patch) | |
| tree | a8aae789b1b002b1c51a6bcc66cf655b8f848570 | |
| parent | e3080e39ab57ae376e6f246894f2864731177e4c (diff) | |
mu4e-view: remove overlays when erasing
erase-buffer is not enough (you'd see '[1][2]' etc. in the buffer beginning)
| -rw-r--r-- | mu4e/mu4e-view.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 6ee96ff..6ece419 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -328,6 +328,7 @@ Add this function to `mu4e-view-mode-hook' to enable this feature." ov-inv (make-overlay ov-beg ov-end) beg ov-end) (overlay-put ov-inv 'invisible t) + (overlay-put ov-inv 'mu4e-overlay t) (when (re-search-forward (concat "^" message-mark-insert-end) nil t) (setq ov-beg (match-beginning 0) @@ -337,6 +338,7 @@ Add this function to `mu4e-view-mode-hook' to enable this feature." (overlay-put ov-inv 'invisible t)) (when (and beg end) (let ((ov (make-overlay beg end))) + (overlay-put ov 'mu4e-overlay t) (overlay-put ov 'face 'mu4e-region-code)) (setq beg nil end nil)))))) @@ -494,6 +496,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))))))))) @@ -621,6 +624,7 @@ marking if it still had that." (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))) @@ -1203,7 +1207,6 @@ the third MIME-part." (gnus-article-inline-part (car html-part)) (mu4e-warn "No html part in this message"))) - (defun mu4e-process-file-through-pipe (path pipecmd) "Process file at PATH through a pipe with PIPECMD." (let ((buf (get-buffer-create "*mu4e-output"))) @@ -1213,7 +1216,6 @@ the third MIME-part." (call-process-shell-command pipecmd path t t) (view-mode))) (switch-to-buffer buf))) - ;;; Bug Reference mode support |
