]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tabulated-list-widen-current-column widening wrong column
authorThuna <thuna.cing@gmail.com>
Sun, 23 Jan 2022 14:55:48 +0000 (15:55 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 23 Jan 2022 14:55:48 +0000 (15:55 +0100)
* tabulated-list.el (tabulated-list-widen-current-column): Use correct
comparison operation when checking if point is within the column
bounds  (bug#53375).

Copyright-paperwork-exempt: yes

lisp/emacs-lisp/tabulated-list.el

index 32a046e0fbdc5799f7257035d71c2272c6ee15fd..a242ac1899da13b7aaefce90a7d3f7edf0c53445 100644 (file)
@@ -739,17 +739,17 @@ Interactively, N is the prefix numeric argument, and defaults to
         col-width)
     (while (and (not found)
                 (< col-nb nb-cols))
-      (if (> start
-             (setq total-width
-                   (+ total-width
-                      (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))))
+      (if (>= start
+              (setq total-width
+                    (+ total-width
+                       (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))