Function: evil-line-string

evil-line-string is a byte-compiled function defined in evil-types.el.

Signature

(evil-line-string BEG END &rest PROPERTIES)

Documentation

Return size of line from BEG to END with PROPERTIES.

Include whole lines.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20260728.1438/evil-types.el
(evil-define-type line
  "Include whole lines."
  :one-to-one nil
  :expand (lambda (beg end)
            (evil-range
             (progn
               (goto-char beg)
               ;; move to beginning of line as displayed
               (evil-move-beginning-of-line)
               (point))
             (progn
               (goto-char end)
               ;; move to the end of line as displayed
               (evil-move-end-of-line)
               (line-beginning-position 2))))
  :contract (lambda (beg end)
              (evil-range beg (max beg (1- end))))
  :string (lambda (beg end)
            (let ((height (count-lines beg end)))
              (format "%s line%s" height
                      (if (= height 1) "" "s")))))