]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: fix off-by-one bug in notmuch-show-archive
authorAaron Ecay <aaronecay@gmail.com>
Thu, 22 Dec 2011 14:24:20 +0000 (09:24 -0500)
committerDavid Bremner <bremner@debian.org>
Fri, 23 Dec 2011 12:29:04 +0000 (08:29 -0400)
Text properties change between characters; prev-s-c-property-change
returns the position after the change.  Thus, it is still inside the
invisible region.

emacs/notmuch-show.el

index 98db8f22e2e0333d02d72afcc98afb79f48cd9b8..b565f336832382862101df17a7a203e76ce46561 100644 (file)
@@ -1157,8 +1157,9 @@ current window), advance to the next open message."
         (ret nil))
     (while (invisible-p visible-end-of-this-message)
       (setq visible-end-of-this-message
-           (previous-single-char-property-change visible-end-of-this-message
-                                                 'invisible)))
+           (max (point-min)
+                (1- (previous-single-char-property-change
+                     visible-end-of-this-message 'invisible)))))
     (cond
      ;; Ideally we would test `end-of-this-message' against the result
      ;; of `window-end', but that doesn't account for the fact that