Function: evil-ex-re-fwd
evil-ex-re-fwd is a byte-compiled function defined in evil-ex.el.
Signature
(evil-ex-re-fwd PATTERN)
Documentation
Search forward for PATTERN.
Return the line number of the match.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-ex.el
(defun evil-ex-re-fwd (pattern)
"Search forward for PATTERN.
Return the line number of the match."
(when evil-ex-search-vim-style-regexp
(setq pattern (evil-transform-vim-style-regexp pattern)))
(set-text-properties 0 (length pattern) nil pattern)
(setq evil-ex-search-pattern (evil-ex-make-search-pattern pattern)
evil-ex-search-direction 'forward)
(condition-case err
(save-excursion
(evil-move-beginning-of-line 2)
(when (or (re-search-forward pattern nil t)
(progn
(goto-char (point-min))
(re-search-forward pattern nil t)))
(line-number-at-pos (match-beginning 0))))
(invalid-regexp
(evil-ex-echo (cadr err))
nil)))