diff options
Diffstat (limited to 'lib/net/jao-notmuch.el')
-rw-r--r-- | lib/net/jao-notmuch.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 72ca85b..53137be 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -243,8 +243,11 @@ (notmuch-show-strip-re) (notmuch-sanitize))) (c (apply 'jao-notmuch--format-counts q nc)) - (n (max 1 (- (window-width) (string-width s) (string-width c))))) - (setq-local header-line-format (concat s (make-string n ? ) c))))))) + (n (- (window-width) 3 (string-width s) (string-width c))) + (s (if (< n 0) (substring s 0 (- n 4)) s)) + (n (if (< n 0) 5 (1+ n)))) + (setq-local header-line-format + (concat " " s (make-string n ? ) c))))))) (defun jao-notmuch-tree--find-update-header-line (&rest _args) (when-let ((mb (if (derived-mode-p 'notmuch-show-mode) |