]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-hello: Fix a sign error when computing number of padding spaces.
authorCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 03:51:31 +0000 (20:51 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 27 Apr 2010 03:51:31 +0000 (20:51 -0700)
After the previous commit, toggling the visibility of tags could
result in notmuch-hello aborting with:

Wrong type argument: wholenump, -1

At least, the error only occurred for me when making tags visible. But
that may be because my longest tag name is longer than my longest
saved-search name.

emacs/notmuch-hello.el

index 5d601acf4da0aca87677005d7158a458075fb6fc..3a7038796ec6bf6240f5ff0ae887269a18c745a3 100644 (file)
@@ -174,7 +174,7 @@ diagonal."
                                :notify #'notmuch-hello-widget-search
                                :notmuch-search-terms (cdr elem)
                                (format "%s " (car elem)))
-                (insert (make-string (1- (- widest (length (car elem)))) ? )))
+                (insert (make-string (1+ (- widest (length (car elem)))) ? )))
               (setq count (1+ count))
               (if (eq (% count tags-per-line) 0)
                   (widget-insert "\n"))))