Function: evil-ex-delete-or-yank
evil-ex-delete-or-yank is a byte-compiled function defined in
evil-commands.el.
Signature
(evil-ex-delete-or-yank SHOULD-DELETE BEG END TYPE REGISTER COUNT YANK-HANDLER)
Documentation
Execute evil-delete or evil-yank on the given region.
If SHOULD-DELETE is t, evil-delete will be executed, otherwise evil-yank. The region specified by BEG and END will be adjusted if COUNT is given.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
(defun evil-ex-delete-or-yank (should-delete beg end type register count yank-handler)
"Execute evil-delete or evil-yank on the given region.
If SHOULD-DELETE is t, evil-delete will be executed, otherwise
evil-yank.
The region specified by BEG and END will be adjusted if COUNT is
given."
(when count
;; with COUNT, the command should go the end of the region and delete/yank
;; COUNT lines from there
(setq beg (save-excursion (goto-char end)
(line-beginning-position 0))
end (save-excursion (goto-char end)
(line-beginning-position count))
type 'line))
(funcall (if should-delete #'evil-delete #'evil-yank)
beg end type register yank-handler))