Function: evil-visual-select

evil-visual-select is a byte-compiled function defined in evil-states.el.

Signature

(evil-visual-select BEG END &optional TYPE DIR MESSAGE)

Documentation

Create a Visual selection of type TYPE from BEG to END.

Point and mark are positioned so that the resulting selection has the specified boundaries. If DIR is negative, point precedes mark, otherwise it succedes it. To specify point and mark directly, use evil-visual-make-selection.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-states.el
(defun evil-visual-select (beg end &optional type dir message)
  "Create a Visual selection of type TYPE from BEG to END.
Point and mark are positioned so that the resulting selection
has the specified boundaries. If DIR is negative, point precedes mark,
otherwise it succedes it. To specify point and mark directly,
use `evil-visual-make-selection'."
  (let* ((range (evil-contract beg end type))
         (mark (evil-range-beginning range))
         (point (evil-range-end range))
         (dir (or dir 1)))
    (when (< dir 0)
      (evil-swap mark point))
    (evil-visual-make-selection mark point type message)))