Function: evil-inclusive-string

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

Signature

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

Documentation

Return size of inclusive from BEG to END with PROPERTIES.

Include the character under point. Handling for evil-want-visual-char-semi-exclusive is deprecated, and will be removed in a future version.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20260728.1438/evil-types.el
(evil-define-type inclusive
  "Include the character under point.
Handling for `evil-want-visual-char-semi-exclusive' is deprecated,
and will be removed in a future version."
  :expand (lambda (beg end)
            (if (and (with-no-warnings evil-want-visual-char-semi-exclusive)
                     (evil-visual-state-p)
                     (< beg end)
                     (save-excursion
                       (goto-char end)
                       (or (bolp) (eolp))))
                (evil-range beg end 'exclusive)
              (evil-range beg (1+ end))))
  :contract (lambda (beg end)
              (evil-range beg (max beg (1- end))))
  :normalize (lambda (beg end)
               (evil-range beg (if (eq (char-after end) ?\n)
                                   (max beg (1- end)) end)))
  :string (lambda (beg end)
            (let ((width (- end beg)))
              (format "%s character%s" width
                      (if (= width 1) "" "s")))))