aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2015-07-31 12:51:04 +0100
committerArtur Malabarba2015-07-31 12:51:22 +0100
commit8d332aeccab2208e6c6bd434738565e6abf12043 (patch)
treef1d4f0b2c72ba91a203e33f365488f3f6f63840d
parenta246df7256ff119cc14cc9a8f8da34bf2ccc2b65 (diff)
downloademacs-8d332aeccab2208e6c6bd434738565e6abf12043.tar.gz
emacs-8d332aeccab2208e6c6bd434738565e6abf12043.zip
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Fix bug
When updating the very last entry, tabulated-list-print would erase it and then try to look at the next one (which obviously isn't there).
-rw-r--r--lisp/emacs-lisp/tabulated-list.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 9119c3a5ade..cd61eb9ae56 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -356,10 +356,11 @@ changing `tabulated-list-sort-key'."
356 nil) 356 nil)
357 ;; If this entry sorts after id (or it's the 357 ;; If this entry sorts after id (or it's the
358 ;; end), then just insert id and move on. 358 ;; end), then just insert id and move on.
359 ((funcall sorter elt 359 ((or (not local-id)
360 ;; FIXME: Might be faster if 360 (funcall sorter elt
361 ;; don't construct this list. 361 ;; FIXME: Might be faster if
362 (list local-id (tabulated-list-get-entry))) 362 ;; don't construct this list.
363 (list local-id (tabulated-list-get-entry))))
363 (apply tabulated-list-printer elt) 364 (apply tabulated-list-printer elt)
364 nil) 365 nil)
365 ;; We find an entry that sorts before id, 366 ;; We find an entry that sorts before id,