Function: evil-delete-line
evil-delete-line is an interactive and byte-compiled function defined
in evil-commands.el.
Signature
(evil-delete-line BEG END &optional TYPE REGISTER YANK-HANDLER)
Documentation
Delete to end of line.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
(evil-define-operator evil-delete-line (beg end type register yank-handler)
"Delete to end of line."
:motion evil-end-of-line-or-visual-line
(interactive "<R><x>")
(cl-destructuring-bind
(beg end type) (evil-expand-line-for-line-based-operators beg end type)
(if (eq type 'block)
;; Equivalent to $d, i.e., we use the block-to-eol selection and
;; call `evil-delete'. In this case we fake the call to
;; `evil-end-of-line' by setting `temporary-goal-column' and
;; `last-command' appropriately as `evil-end-of-line' would do.
(let ((temporary-goal-column most-positive-fixnum)
(last-command 'next-line))
(evil-delete beg end 'block register yank-handler))
(evil-delete beg end type register yank-handler)
(when (eq 'line type)
(evil-first-non-blank)
(when (and (not evil-start-of-line) evil-operator-start-col)
(move-to-column (if (and (eq most-positive-fixnum temporary-goal-column)
(memq last-command '(next-line previous-line)))
temporary-goal-column
evil-operator-start-col)))))))