X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=02017ce59a0ea1fa107aea832b770405274eb429;hb=38546e4acba5593c6ad8b35712475abc27d3a4fd;hp=333d4c1ea633749cabb7dcf0e31f78241b1eadd2;hpb=3f9d73884ee7c26797a1528b89e1fe63aadc3271;p=notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 333d4c1e..02017ce5 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -299,15 +299,17 @@ should be. Returns a cons cell `(tags-per-line width)'." :notify #'notmuch-hello-widget-search :notmuch-search-terms query formatted-name) - ;; Insert enough space to consume the rest of the - ;; column. Because the button for the name is `(1+ - ;; (length name))' long (due to the trailing space) we - ;; can just insert `(- widest (length name))' spaces - - ;; the column separator is included in the button if - ;; `(equal widest (length name)'. - (widget-insert (make-string (max 1 - (- widest (length name))) - ? )))) + (unless (eq (% count tags-per-line) (1- tags-per-line)) + ;; If this is not the last tag on the line, insert + ;; enough space to consume the rest of the column. + ;; Because the button for the name is `(1+ (length + ;; name))' long (due to the trailing space) we can + ;; just insert `(- widest (length name))' spaces - the + ;; column separator is included in the button if + ;; `(equal widest (length name)'. + (widget-insert (make-string (max 1 + (- widest (length name))) + ? ))))) (setq count (1+ count)) (if (eq (% count tags-per-line) 0) (widget-insert "\n")))