emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/marginalia 1a65026 195/241: marginalia-annotate-buffer:


From: Stefan Monnier
Subject: [elpa] externals/marginalia 1a65026 195/241: marginalia-annotate-buffer: Truncate mode-name to fix alignment
Date: Fri, 28 May 2021 20:49:25 -0400 (EDT)

branch: externals/marginalia
commit 1a650263a36967ed8f8fd2c8b8d89cd55f30e416
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    marginalia-annotate-buffer: Truncate mode-name to fix alignment
    
    See #63
---
 marginalia.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index df68fd4..5dd0497 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -571,8 +571,10 @@ The string is transformed according to 
`marginalia-bookmark-type-transformers'."
                           marginalia--separator
                           (7 (:propertize "%I" face marginalia-size))
                           marginalia--separator
-                          ;; InactiveMinibuffer has 18 letters
-                          (18 (:propertize mode-name face marginalia-mode)))
+                          ;; InactiveMinibuffer has 18 letters, but there are 
longer names.
+                          ;; For example Org-Agenda produces very long mode 
names.
+                          ;; Therefore we have to truncate.
+                          (20 (-20 (:propertize mode-name face 
marginalia-mode))))
                         nil nil buffer))
      ((if-let (proc (get-buffer-process buffer))
           (format "(%s %s) %s"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]