]> git.cworth.org Git - notmuch-old/commit
Fix bug in adding or removing tag by region.
authorJesse Rosenthal <jrosenthal@jhu.edu>
Tue, 13 Apr 2010 18:47:19 +0000 (14:47 -0400)
committerCarl Worth <cworth@cworth.org>
Wed, 14 Apr 2010 17:09:53 +0000 (10:09 -0700)
commit2fbb6d05a931b23c307aee3af05ab488c6bca425
tree01b8dc1a08b44ea25ced04a2695c0f56012eb01c
parent85baeb63751a21cd8418165d736d9781be8f8aa1
Fix bug in adding or removing tag by region.

There was a bug in notmuch-search-{add,remove}-tag-region, which would
not behave correctly if the region went beyond the last message. Now,
instead of simply iterating to the last line of the region, these
functions will iterate to the minimum of the last line of the region
and the last possible line, i.e.

(- (line-number-at-pos (point-max)) 2)

Tested-by: Carl Worth <cworth@cworth.org> Note that the old, buggy
behavior included infinite loops of emacs lisp code, so the new
behavior is significantly better than that.
emacs/notmuch.el