From: Aaron Ecay <aaronecay@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
Date: Thu, 22 Dec 2011 09:24:20 -0500 [thread overview]
Message-ID: <1324563860-21986-1-git-send-email-aaronecay@gmail.com> (raw)
In-Reply-To: <m2vcp9c9bk.fsf@kcals.intra.maillard.im>
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 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f52f233..905c9ec 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1169,8 +1169,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
--
1.7.8
next prev parent reply other threads:[~2011-12-22 14:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 23:08 [BUG?] Pressing SPACEbar is not doing what's expected Xavier Maillard
2011-12-21 23:19 ` Jameson Graef Rollins
2011-12-22 8:14 ` Xavier Maillard
2011-12-22 14:24 ` Aaron Ecay [this message]
2011-12-22 22:37 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Xavier Maillard
2011-12-22 22:45 ` Jameson Graef Rollins
2011-12-23 12:38 ` David Bremner
2011-12-23 15:00 ` Dmitry Kurochkin
2011-12-23 15:00 ` Dmitry Kurochkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324563860-21986-1-git-send-email-aaronecay@gmail.com \
--to=aaronecay@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).