]> git.cworth.org Git - notmuch/commitdiff
emacs: show: lazy part handling bugfix
authorMark Walters <markwalters1009@gmail.com>
Fri, 6 Sep 2013 23:28:45 +0000 (00:28 +0100)
committerDavid Bremner <bremner@debian.org>
Tue, 10 Sep 2013 11:05:05 +0000 (08:05 -0300)
The lazy part handler had a bug that it allowed the button to be
toggled to be specified. During toggling it needs to save and restore
the text-properties for the button but it actually saved the text
properties at point rather than from the button.

In almost all cases this didn't matter as as point had the same text
properties as the button. However, it is a bug and did cause incorrect
behaviour in some cases: see id:87txhz14z6.fsf@qmul.ac.uk for details.

emacs/notmuch-show.el

index 904b98e1865fa7bfebadf1fa96b1b86419fe7a99..32c971a8cb79343d9e8e0c9ae8337aa13c025bb3 100644 (file)
@@ -470,7 +470,7 @@ message at DEPTH in the current thread."
             (new-start (button-start button))
             (button-label (button-get button :base-label))
             (old-point (point))
-            (properties (text-properties-at (point)))
+            (properties (text-properties-at (button-start button)))
             (inhibit-read-only t))
        ;; Toggle the button itself.
        (button-put button :notmuch-part-hidden (not show))