Function: evil-forward-beginning

evil-forward-beginning is a byte-compiled function defined in evil-common.el.

Signature

(evil-forward-beginning THING &optional COUNT)

Documentation

Move forward to beginning of THING.

The motion is repeated COUNT times.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
;;; Motion functions
(defun evil-forward-beginning (thing &optional count)
  "Move forward to beginning of THING.
The motion is repeated COUNT times."
  (setq count (or count 1))
  (if (< count 0)
      (forward-thing thing count)
    (let ((bnd (bounds-of-thing-at-point thing))
          rest)
      (when (and bnd (< (point) (cdr bnd)))
        (goto-char (cdr bnd)))
      (ignore-errors
        (when (zerop (setq rest (forward-thing thing count)))
          (when (and (bounds-of-thing-at-point thing)
                     (not (bobp))
                     ;; handle final empty line
                     (not (and (bolp) (eobp))))
            (backward-char))
          (beginning-of-thing thing)))
      rest)))