]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-wash.el
emacs: Retain text properties when toggling buttons
[notmuch] / emacs / notmuch-wash.el
index 8a68819cc9940be440871622cbfda237f6749962..8fe91e1415944e3ec132dab441ff3641c0029fde 100644 (file)
@@ -104,9 +104,11 @@ lower).")
         (overlay (button-get cite-button 'overlay))
         (button-label (notmuch-wash-button-label overlay))
         (old-point (point))
+        (properties (text-properties-at (point)))
         (inhibit-read-only t))
     (goto-char new-start)
     (insert button-label)
+    (set-text-properties new-start (point) properties)
     (let ((old-end (button-end cite-button)))
       (move-overlay cite-button new-start (point))
       (delete-region (point) old-end))