mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-04 21:12:23 -08:00
Fix handling of duplicate (evil) bindings in show keymap
This commit is contained in:
parent
0dc4e84722
commit
a4095e8ee6
1 changed files with 6 additions and 2 deletions
|
|
@ -1707,8 +1707,12 @@ ones. PREFIX is for internal use and should not be used."
|
|||
(bound-and-true-p evil-local-mode)
|
||||
(string-match-p (format "<%s-state>$" evil-state) key-desc))
|
||||
(setq bindings
|
||||
(append bindings
|
||||
(which-key--get-keymap-bindings def all prefix))))
|
||||
;; this function keeps the latter of the two duplicates
|
||||
;; which will be the evil binding
|
||||
(cl-remove-duplicates
|
||||
(append bindings
|
||||
(which-key--get-keymap-bindings def all prefix))
|
||||
:test (lambda (a b) (string= (car a) (car b))))))
|
||||
((and (keymapp def)
|
||||
(string-match-p which-key--evil-keys-regexp key-desc)))
|
||||
((and (keymapp def)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue