[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 172c055745: Fix tabulated-list-widen-current-column widening wron
From: |
Lars Ingebrigtsen |
Subject: |
master 172c055745: Fix tabulated-list-widen-current-column widening wrong column |
Date: |
Thu, 20 Jan 2022 09:23:57 -0500 (EST) |
branch: master
commit 172c055745b1eb32def7be8ddcaae975996a789f
Author: Thuna <thuna.cing@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix tabulated-list-widen-current-column widening wrong column
* tabulated-list.el (tabulated-list-widen-current-column): Account
for the padding and the content width when calculating column
width (bug#53375).
Copyright-paperwork-exempt: yes
---
lisp/emacs-lisp/tabulated-list.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/tabulated-list.el
b/lisp/emacs-lisp/tabulated-list.el
index 4a9814b5da..32a046e0fb 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 172c055745: Fix tabulated-list-widen-current-column widening wrong column,
Lars Ingebrigtsen <=