Function: evil-select-inner-object
evil-select-inner-object is a byte-compiled function defined in
evil-common.el.
Signature
(evil-select-inner-object THING BEG END TYPE &optional COUNT LINE)
Documentation
Return an inner text object range of COUNT objects.
If COUNT is positive, return objects following point; if COUNT is
negative, return objects preceding point. If one is unspecified,
the other is used with a negative argument. THING is a symbol
understood by thing-at-point. BEG, END and TYPE specify the
current selection. If LINE is non-nil, the text object should be
linewise, otherwise it is character wise.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defun evil-select-inner-object (thing beg end type &optional count line)
"Return an inner text object range of COUNT objects.
If COUNT is positive, return objects following point; if COUNT is
negative, return objects preceding point. If one is unspecified,
the other is used with a negative argument. THING is a symbol
understood by `thing-at-point'. BEG, END and TYPE specify the
current selection. If LINE is non-nil, the text object should be
linewise, otherwise it is character wise."
(let* ((count (or count 1))
(bnd (or (let ((b (bounds-of-thing-at-point thing)))
(and b (< (point) (cdr b)) b))
(evil-bounds-of-not-thing-at-point thing)
(cons (point-min) (point-max)))))
;; check if current object is selected
(when (or (not beg) (not end)
(> beg (car bnd))
(< end (cdr bnd))
(and (eq type 'inclusive)
(= (1+ beg) end))) ; empty region does not count
(when (or (not beg) (< (car bnd) beg)) (setq beg (car bnd)))
(when (or (not end) (> (cdr bnd) end)) (setq end (cdr bnd)))
(setq count (if (> count 0) (1- count) (1+ count))))
(goto-char (if (< count 0) beg end))
(evil-forward-nearest count
#'(lambda (cnt) (forward-thing thing cnt))
#'(lambda (cnt) (evil-forward-not-thing thing cnt)))
(evil-range (if (>= count 0) beg (point))
(if (< count 0) end (point))
(if line 'line type)
:expanded t)))