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

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

[elpa] externals/marginalia 0bd8061 077/241: marginalia--fields: allow a


From: Stefan Monnier
Subject: [elpa] externals/marginalia 0bd8061 077/241: marginalia--fields: allow alignment to the right by using a negative width
Date: Fri, 28 May 2021 20:49:00 -0400 (EDT)

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

    marginalia--fields: allow alignment to the right by using a negative width
---
 marginalia.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/marginalia.el b/marginalia.el
index 4dabb30..1f323e1 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -253,7 +253,7 @@ FORMAT is a format string. This must be used if the field 
value is not a string.
 FACE is the name of the face, with which the field should be propertized.
 WIDTH is the format width. This can be specified as alternative to FORMAT."
   (cl-assert (not (and width format)))
-  (when width (setq format (format "%%-%ds" width)))
+  (when width (setq format (format "%%%ds" (- width))))
   (when format (setq field `(format ,format ,field)))
   (when truncate (setq field `(marginalia--truncate ,field ,truncate)))
   (when face (setq field `(propertize ,field 'face ,face)))



reply via email to

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