diff options
author | Alan Mackenzie <acm@muc.de> | 2022-01-22 11:02:50 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2022-01-22 11:02:50 +0000 |
commit | 14d64a8adcc866deecd758b898e8ef2d836b354a (patch) | |
tree | 83cff9669e266f8e283ccb8cd7518e909240f1e1 /lisp/emacs-lisp/tabulated-list.el | |
parent | bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff) | |
parent | ebe334cdc234de2897263aed4c05ac7088c11857 (diff) | |
download | emacs-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.el | 12 |
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)) |