X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=eb5335ff2f7f918865d7681fc18a50510e7abce0;hb=3d64993586af7286c6b0fc56bdcef19ae7813c80;hp=f5de8ae91a79fdf8679b2b6b13e2776ad208a6a8;hpb=01ec4d3bcb660e0b26f66db02c25b3dfaec5e1fe;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f5de8ae9..eb5335ff 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)))