Skip to content

Commit

Permalink
Improve evil-change's handling of screen-lines
Browse files Browse the repository at this point in the history
When the type is screen-line and multiple real lines are spanned, make
evil-change behave like it does for the line type (e.g., by adding and indenting
a new line after deletion).

Partially fixes emacs-evil#1407
  • Loading branch information
justbur committed Apr 4, 2023
1 parent c61bc34 commit 502fb46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,9 @@ of the block."
(evil-start-undo-step))
(funcall delete-func beg end type register yank-handler)
(cond
((eq type 'line)
((or (eq type 'line)
(and (eq type 'screen-line)
(> nlines 1)))
(setq this-command 'evil-change-whole-line) ; for evil-maybe-remove-spaces
(cond
((/= opoint leftmost-point) (evil-insert 1)) ; deletion didn't delete line
Expand Down

0 comments on commit 502fb46

Please sign in to comment.