From b2c3ae43cac9c31c24ca82000ba0d6999562a655 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 29 Apr 2022 02:52:56 +0100 Subject: mail nits --- lib/net/jao-notmuch.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/net') 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) -- cgit v1.2.3