fix(vertico): remove noise from which-key indicator

Embark adds easier prefix-argument and digit-argument insertion in
embark-act, but these clog up the space in the which-key indicator

Also update the embark-become test to the new target format.
This commit is contained in:
Itai Y. Efrat 2021-10-30 19:22:46 +03:00
parent 423939033f
commit c8199c5c20

View file

@ -192,7 +192,7 @@ targets."
(if (null keymap)
(which-key--hide-popup-ignore-command)
(which-key--show-keymap
(if (eq (caar targets) 'embark-become)
(if (eq (plist-get (car targets) :type) 'embark-become)
"Become"
(format "Act on %s '%s'%s"
(plist-get (car targets) :type)
@ -203,7 +203,8 @@ targets."
((and (pred keymapp) km) km)
(_ (key-binding prefix 'accept-default)))
keymap)
nil nil t))))
nil nil t (lambda (binding)
(not (string-suffix-p "-argument" (cdr binding))))))))
;;;###autoload
(defun +vertico/crm-select ()