X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch.el;h=ab56f4803faca8efe5188a441c66b65f8fed4ee6;hb=c375f7a4078f88f9d35503cbe3feea063aee3358;hp=5577dde797b6a6462fef23ae7c37c1845051f802;hpb=095a02211e696434e5b41a85ab516b3a639f9a9b;p=notmuch diff --git a/notmuch.el b/notmuch.el index 5577dde7..ab56f480 100644 --- a/notmuch.el +++ b/notmuch.el @@ -592,7 +592,7 @@ Returns nil if already on the first message in the buffer." nil t)) (recenter 0) - (nil)))) + nil))) (defun notmuch-show-previous-message () "Backup to the previous message (whether open or closed) @@ -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 () @@ -1436,8 +1442,7 @@ which match the current search terms." (defun notmuch-search-remove-tag (tag) "Remove a tag from the currently selected thread. -The tag is removed from messages in the currently selected thread -which match the current search terms." +The tag is removed from all messages in the currently selected thread." (interactive (list (notmuch-select-tag-with-completion "Tag to remove: " (notmuch-search-find-thread-id)))) (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id))