From c8199c5c20509a60237f0841be73b4a54f177f9c Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Sat, 30 Oct 2021 19:22:46 +0300 Subject: [PATCH] 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. --- modules/completion/vertico/autoload/vertico.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/completion/vertico/autoload/vertico.el b/modules/completion/vertico/autoload/vertico.el index 84f149a9e..7ea6a47e4 100644 --- a/modules/completion/vertico/autoload/vertico.el +++ b/modules/completion/vertico/autoload/vertico.el @@ -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 ()