]> git.eshelyaron.com Git - emacs.git/commitdiff
tabulated-list-print delete excess lines
authorShitikanth Kashyap <shitikanth1@gmail.com>
Wed, 25 Aug 2021 11:34:45 +0000 (13:34 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 25 Aug 2021 11:34:45 +0000 (13:34 +0200)
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Ensure
that we delete remaining lines if the list has gotten shorter
(bug#50194).

Copyright-paperwork-exempt: yes

lisp/emacs-lisp/tabulated-list.el

index f0ee78745ac878df2243a50edc141024fb07edd2..fecfa91147ed6dd14754c0db91d8613d2a1cd607 100644 (file)
@@ -481,6 +481,8 @@ changing `tabulated-list-sort-key'."
               (forward-line 1)
               (delete-region old (point))))))
       (setq entries (cdr entries)))
+    (when update
+      (delete-region (point) (point-max)))
     (set-buffer-modified-p nil)
     ;; If REMEMBER-POS was specified, move to the "old" location.
     (if saved-pt