1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-24 00:40:35 -08:00

Fix behavior of f and t in evil operator map

f and t (also F and T) read characters manually, so the popup should not be
shown after these commands. This only applies if
which-key-show-operator-state-maps is non-nil.

Fixes #191
This commit is contained in:
Justin Burkett 2018-05-22 10:11:15 -04:00
parent 8a878de16d
commit 206be7a42b

View file

@ -2451,8 +2451,8 @@ is selected interactively by mode in `minor-mode-map-alist'."
nil "evil operator/motion keys"))
(which-key--show-page)))))
(let* ((key (key-description (list (read-key)))))
(when (string= key "`")
;; evil-goto-mark reads the next char manually
(when (member key '("f" "F" "t" "T" "`"))
;; these keys trigger commands that read the next char manually
(setq which-key--inhibit-next-operator-popup t))
(cond ((and which-key-use-C-h-commands (string= "C-h" key))
(which-key-C-h-dispatch))