diff options
author | Carl Worth <cworth@cworth.org> | 2010-03-09 08:11:45 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-03-09 08:11:45 -0800 |
commit | c5085642b8c6495ffea3d5709aa6da14cd1d8688 (patch) | |
tree | 2828ae372cba84f6f96090bef1c9488274000f18 /notmuch.el | |
parent | c963098e2890922ffcf0991466ba66f724e2dfa4 (diff) |
emacs: Fix backspace to not scroll more than the previous message
The bug was occuring due to counting invisible lines, but then
scrolling past them since they are invisible.
Diffstat (limited to 'notmuch.el')
-rw-r--r-- | notmuch.el | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -647,7 +647,13 @@ any effects from previous calls to (condition-case nil (scroll-down nil) ((beginning-of-buffer) nil)) - (goto-char (window-start))) + (goto-char (window-start)) + ; Because count-lines counts invivisible lines, we may have + ; scrolled to far. If so., notice this and fix it up. + (if (< (point) previous) + (progn + (goto-char previous) + (recenter 0)))) (notmuch-show-previous-message)))) (defun notmuch-show-advance-and-archive () |