Function: evil-exclusive-string
evil-exclusive-string is a byte-compiled function defined in
evil-types.el.
Signature
(evil-exclusive-string BEG END &rest PROPERTIES)
Documentation
Return size of exclusive from BEG to END with PROPERTIES.
Return the positions unchanged, with some exceptions. If the end position is at the beginning of a line, then:
* If the beginning position is at or before the first non-blank
character on the line, return line (expanded).
* Otherwise, move the end position to the end of the previous
line and return inclusive (expanded).
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20260728.1438/evil-types.el
;;; Code:
;;; Type definitions
(evil-define-type exclusive
"Return the positions unchanged, with some exceptions.
If the end position is at the beginning of a line, then:
* If the beginning position is at or before the first non-blank
character on the line, return `line' (expanded).
* Otherwise, move the end position to the end of the previous
line and return `inclusive' (expanded)."
:normalize (lambda (beg end)
(cond
((progn
(goto-char end)
(and (/= beg end) (bolp)))
(setq end (max beg (1- end)))
(cond
((progn
(goto-char beg)
(looking-back "^[ \f\t\v]*" (line-beginning-position)))
(evil-expand beg end 'line))
(t
(unless evil-cross-lines
(setq end (max beg (1- end))))
(evil-expand beg end 'inclusive))))
(t
(evil-range beg end))))
:string (lambda (beg end)
(let ((width (- end beg)))
(format "%s character%s" width
(if (= width 1) "" "s")))))