1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-27 10:21:14 -08:00

Fix replacement of keys when prefix is nil

The prefix is nil at the top-level keymap

Fixes #163
This commit is contained in:
Justin Burkett 2017-03-15 13:55:01 -04:00
parent 0d56e4369b
commit 3c7ecc69d4

View file

@ -1459,7 +1459,10 @@ alists. Returns a list (key separator description)."
(let* ((key (car key-binding))
(orig-desc (cdr key-binding))
(group (which-key--group-p orig-desc))
(keys (concat (which-key--current-key-string) " " key))
;; At top-level prefix is nil
(keys (if which-key--current-prefix
(concat (which-key--current-key-string) " " key)
key))
(local (eq (which-key--safe-lookup-key local-map (kbd keys))
(intern orig-desc)))
(hl-face (which-key--highlight-face orig-desc))