Function: evil-flash-hook
evil-flash-hook is a byte-compiled function defined in evil-search.el.
Signature
(evil-flash-hook &optional FORCE)
Documentation
Disable hightlighting if this-command is not search.
Disable anyway if FORCE is t.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-search.el
(defun evil-flash-hook (&optional force)
"Disable hightlighting if `this-command' is not search.
Disable anyway if FORCE is t."
(when (or force
;; to avoid flicker, don't disable highlighting
;; if the next command is also a search command
(not (memq this-command
'(evil-search-backward
evil-search-forward
evil-search-next
evil-search-previous
evil-search-word-backward
evil-search-word-forward))))
(evil-echo-area-restore)
(isearch-dehighlight)
(setq isearch-lazy-highlight-last-string nil)
(lazy-highlight-cleanup t)
(when evil-flash-timer
(cancel-timer evil-flash-timer)))
(remove-hook 'pre-command-hook #'evil-flash-hook t)
(remove-hook 'evil-operator-state-exit-hook #'evil-flash-hook t))