mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
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.
This commit is contained in:
parent
e247ae47c1
commit
159b05fcaa
1 changed files with 2 additions and 2 deletions
|
@ -833,7 +833,7 @@ 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))
|
||||
(if (<= (count-screen-lines (window-start) start-of-message)
|
||||
next-screen-context-lines)
|
||||
(progn
|
||||
(goto-char (notmuch-show-message-top))
|
||||
|
|
Loading…
Reference in a new issue