summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/tabulated-list.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-22 11:02:50 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-22 11:02:50 +0000
commit14d64a8adcc866deecd758b898e8ef2d836b354a (patch)
tree83cff9669e266f8e283ccb8cd7518e909240f1e1 /lisp/emacs-lisp/tabulated-list.el
parentbdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff)
parentebe334cdc234de2897263aed4c05ac7088c11857 (diff)
downloademacs-14d64a8adcc866deecd758b898e8ef2d836b354a.tar.gz
emacs-14d64a8adcc866deecd758b898e8ef2d836b354a.tar.bz2
emacs-14d64a8adcc866deecd758b898e8ef2d836b354a.zip
Merge branch 'master' into scratch/correct-warning-pos
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r--lisp/emacs-lisp/tabulated-list.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 4a9814b5daf..32a046e0fbd 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -731,6 +731,7 @@ Interactively, N is the prefix numeric argument, and defaults to
1."
(interactive "p")
(let ((start (current-column))
+ (entry (tabulated-list-get-entry))
(nb-cols (length tabulated-list-format))
(col-nb 0)
(total-width 0)
@@ -741,9 +742,14 @@ Interactively, N is the prefix numeric argument, and defaults to
(if (> start
(setq total-width
(+ total-width
- (setq col-width
- (cadr (aref tabulated-list-format
- col-nb))))))
+ (max (setq col-width
+ (cadr (aref tabulated-list-format
+ col-nb)))
+ (string-width (aref entry col-nb)))
+ (or (plist-get (nthcdr 3 (aref tabulated-list-format
+ col-nb))
+ :pad-right)
+ 1))))
(setq col-nb (1+ col-nb))
(setq found t)
(setf (cadr (aref tabulated-list-format col-nb))