summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-25 00:33:21 +0200
committerStefan Kangas <stefan@marxist.se>2021-09-25 00:33:21 +0200
commit2767c89db729a6106146d0aeff76678c64d4fc53 (patch)
treec03f2379dfacafa81d6ee708fdd744d33a445918 /lisp/emacs-lisp
parentd03995197dcc1a2a26636fe466bf4691175c89ad (diff)
downloademacs-2767c89db729a6106146d0aeff76678c64d4fc53.tar.gz
emacs-2767c89db729a6106146d0aeff76678c64d4fc53.tar.bz2
emacs-2767c89db729a6106146d0aeff76678c64d4fc53.zip
Fix alignment on font size change in tabulated-list-mode
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col): Fix bug where the columns didn't align correctly when using 'text-scale-mode' to decrease the font size. (Bug#48639)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/tabulated-list.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index f148bc1768c..5210b2be5e0 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -581,7 +581,8 @@ Return the column number after insertion."
(when not-last-col
(when (> pad-right 0) (insert (make-string pad-right ?\s)))
(insert (propertize
- (make-string (- width (min width label-width)) ?\s)
+ ;; We need at least one space to align correctly.
+ (make-string (- width (min 1 width label-width)) ?\s)
'display `(space :align-to ,next-x))))
(put-text-property opoint (point) 'tabulated-list-column-name name)
next-x)))