Function: consult--count-lines

consult--count-lines is a natively compiled function defined in consult.el.

Signature

(consult--count-lines POS)

Documentation

Move to position POS and return number of lines.

Source Code

;; Defined in /nix/store/6higv2v1wk916v4ynnybyrdkfy2gq44d-emacs-packages-deps/share/emacs/site-lisp/elpa/consult-20261004.957/consult.el
(defun consult--count-lines (pos)
  "Move to position POS and return number of lines."
  (let ((line 1))
    (while (< (point) pos)
      (forward-line)
      (when (<= (point) pos)
        (incf line)))
    (goto-char pos)
    line))