branch: externals/marginalia
commit 1a650263a36967ed8f8fd2c8b8d89cd55f30e416
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@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