diff options
author | Shitikanth Kashyap <shitikanth1@gmail.com> | 2021-08-25 13:34:45 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-25 13:34:45 +0200 |
commit | f09ee98e6877a1b8b33bd9ec976d71f1b2d6d2da (patch) | |
tree | 91b4cc62f0e0b1979ada71d728b0966c26db0420 /lisp/emacs-lisp | |
parent | 630a13ac4631866889bab1177e06ca1d693708c1 (diff) | |
download | emacs-f09ee98e6877a1b8b33bd9ec976d71f1b2d6d2da.tar.gz emacs-f09ee98e6877a1b8b33bd9ec976d71f1b2d6d2da.tar.bz2 emacs-f09ee98e6877a1b8b33bd9ec976d71f1b2d6d2da.zip |
tabulated-list-print delete excess lines
* 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
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index f0ee78745ac..fecfa91147e 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -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 |