summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)))