Closed zhaojiangbin closed 3 years ago
I don't see a fix here
Given the following keymap,
(setq a-map (make-sparse-keymap))
(bind-keys :map a-map
("a" . ("one" . some-command))
("b" . ("two" . another-command)))
without the changes, in particular that in which-key--get-bindings
, the binding "b -> two" would be displayed first, followed by "a -> one". The sorting was on the command names ("some-command" vs. "another-command") but it were the replacements shown.
With the changes, the bindings are displayed in the expected order: "a -> one" followed by "b -> two". The sorting is now on the replacements ("one" vs. "two").
which-key-description-order
was not sorting the bindings by their descriptions (i.e. replacements).Pull requests are welcome as long as the following apply.