emacs-diffs
[Top][All Lists]
Advanced

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

master 2767c89: Fix alignment on font size change in tabulated-list-mode


From: Stefan Kangas
Subject: master 2767c89: Fix alignment on font size change in tabulated-list-mode
Date: Fri, 24 Sep 2021 18:35:06 -0400 (EDT)

branch: master
commit 2767c89db729a6106146d0aeff76678c64d4fc53
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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)
---
 lisp/emacs-lisp/tabulated-list.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index f148bc1..5210b2b 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)))



reply via email to

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