summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorDavid Edmondson <dme@dme.org>2010-04-26 15:53:52 +0100
committerCarl Worth <cworth@cworth.org>2010-04-26 10:33:38 -0700
commit159b05fcaa8f9cf717bef74ca098d9567c85fe4c (patch)
tree216728bb17ce868390279ab4a14d6e4cf3488b34 /emacs
parente247ae47c10e8f584b7256eef55a5d722f45c0b3 (diff)
emacs: Fix `notmuch-show-rewind' in the presence of invisible text
When determining whether or not to re-align the head of the current message with the top of the window, use `count-screen-lines' rather than `count-lines' to allow for invisible text in the preceding message. When comparing that number of lines against `next-screen-context-lines', realign if the number of lines of the previous message visible is 'smaller than or equal to' rather than just 'smaller than' to improve usability.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-show.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f5de8ae..eb5335f 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -833,8 +833,8 @@ any effects from previous calls to
;; If a small number of lines from the previous message are
;; visible, realign so that the top of the current message is at
;; the top of the screen.
- (if (< (count-lines (window-start) (notmuch-show-message-top))
- next-screen-context-lines)
+ (if (<= (count-screen-lines (window-start) start-of-message)
+ next-screen-context-lines)
(progn
(goto-char (notmuch-show-message-top))
(notmuch-show-message-adjust)))