1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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)
This commit is contained in:
Stefan Kangas 2021-09-25 00:33:21 +02:00
parent d03995197d
commit 2767c89db7

View file

@ -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)))