]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Don't move to the next thread unless the cursor is at the end of the buffer.
authorDavid Edmondson <dme@dme.org>
Tue, 31 Jan 2012 08:01:54 +0000 (08:01 +0000)
committerDavid Bremner <bremner@debian.org>
Sun, 29 Apr 2012 18:54:13 +0000 (15:54 -0300)
When using the spacebar to scroll through a thread, hitting 'space'
when the bottom of the last message is visible should take the cursor
to the end of the buffer rather than immediately archiving the thread
and moving to the next thread.

emacs/notmuch-show.el

index 2c0b767f6964f39d93f04006126ba07823a16fca..e0dce21070f6a8714484d3a7b40214b42bcbe9ea 100644 (file)
@@ -1444,6 +1444,11 @@ current window), advance to the next open message."
       ;; This is not the last message - move to the next visible one.
       (notmuch-show-next-open-message))
 
+     ((not (= (point) (point-max)))
+      ;; This is the last message, but the cursor is not at the end of
+      ;; the buffer. Move it there.
+      (goto-char (point-max)))
+
      (t
       ;; This is the last message - change the return value
       (setq ret t)))