branch: externals/marginalia
commit 0bd8061a44e9b100519123efcbd32030526c33a1
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
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)))