Function: evil-repeat-search

evil-repeat-search is a byte-compiled function defined in evil-commands.el.

Signature

(evil-repeat-search FLAG)

Documentation

Called to record a search command.

FLAG is either pre or post if the function is called before resp. after executing the command.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
;;; Search

(defun evil-repeat-search (flag)
  "Called to record a search command.
FLAG is either `pre' or `post' if the function is called before resp.
after executing the command."
  (cond
   ((and (evil-operator-state-p) (eq flag 'pre))
    (evil-repeat-record (this-command-keys))
    (evil-clear-command-keys))
   ((and (evil-operator-state-p) (eq flag 'post))
    ;; The value of (this-command-keys) at this point should be the
    ;; key-sequence that called the last command that finished the
    ;; search, usually RET. Therefore this key-sequence will be
    ;; recorded in the post-command of the operator. Alternatively we
    ;; could do it here.
    (evil-repeat-record (if evil-regexp-search
                            (car-safe regexp-search-ring)
                          (car-safe search-ring))))
   (t (evil-repeat-motion flag))))