aboutsummaryrefslogtreecommitdiff
path: root/evil-commands.el
diff options
context:
space:
mode:
Diffstat (limited to 'evil-commands.el')
-rw-r--r--evil-commands.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/evil-commands.el b/evil-commands.el
index 21a2527..286cf94 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2356,6 +2356,11 @@ leave the cursor just after the new text."
(setq beg evil-visual-beginning
end evil-visual-end
type (evil-visual-type))
+ ;; When pasting charwise text into linewise selection, keep trailing NL
+ (when (and text end
+ (eq 'line type)
+ (not (eq ?\n (aref text (1- (length text))))))
+ (cl-decf end))
(evil-visual-rotate 'upper-left)
(evil-delete beg end type (unless evil-kill-on-visual-paste ?_))
(when (and (eq yank-handler #'evil-yank-line-handler)