Function: evil-flash-search-pattern
evil-flash-search-pattern is a byte-compiled function defined in
evil-search.el.
Signature
(evil-flash-search-pattern STRING &optional ALL)
Documentation
Flash last search matches for duration of evil-flash-delay.
If ALL is non-nil, flash all matches. STRING is a message to display in the echo area.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-search.el
(defun evil-flash-search-pattern (string &optional all)
"Flash last search matches for duration of `evil-flash-delay'.
If ALL is non-nil, flash all matches. STRING is a message
to display in the echo area."
(let ((lazy-highlight-initial-delay 0)
(isearch-search-fun-function 'evil-isearch-function)
(isearch-case-fold-search case-fold-search)
(disable #'(lambda (&optional _arg) (evil-flash-hook t))))
(when evil-flash-timer
(cancel-timer evil-flash-timer))
(unless (or (null string)
(string= string ""))
(evil-echo-area-save)
(evil-echo "%s" string)
(isearch-highlight (match-beginning 0) (match-end 0))
(when all
(setq isearch-lazy-highlight-wrapped nil
isearch-lazy-highlight-start (point)
isearch-lazy-highlight-end (point))
(isearch-lazy-highlight-new-loop)
(unless isearch-lazy-highlight-overlays
(isearch-lazy-highlight-update)))
(add-hook 'pre-command-hook #'evil-flash-hook nil t)
(add-hook 'evil-operator-state-exit-hook #'evil-flash-hook nil t)
(add-hook 'pre-command-hook #'evil-clean-isearch-overlays nil t)
(setq evil-flash-timer
(run-at-time evil-flash-delay nil disable)))))