]> git.eshelyaron.com Git - emacs.git/commitdiff
Make the reverse tabulated list sort stable
authorJohan Claesson <johanclaesson@bredband.net>
Fri, 20 Sep 2019 22:06:58 +0000 (00:06 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 20 Sep 2019 22:06:58 +0000 (00:06 +0200)
* lisp/emacs-lisp/tabulated-list.el (tabulated-list--get-sorter):
Make the reverse sorting stable (bug#37174).

Copyright-paperwork-exempt: yes

lisp/emacs-lisp/tabulated-list.el

index 63ae1f8c07288918a1cd83bb9fc48ea56e7e81a2..f30e2c0ec8e4034897e794ea30801cc0ea88d2d2 100644 (file)
@@ -373,7 +373,7 @@ column.  Negate the predicate that would be returned if
                                   (if (stringp b) b (car b)))))))
       ;; Reversed order.
       (if (cdr tabulated-list-sort-key)
-          (lambda (a b) (not (funcall sorter a b)))
+          (lambda (a b) (funcall sorter b a))
         sorter))))
 
 (defsubst tabulated-list--col-local-max-widths (col)