[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil 214fd3bcd7 2/5: Blockwise visual paste handles linewi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil 214fd3bcd7 2/5: Blockwise visual paste handles linewise text |
Date: |
Mon, 18 Apr 2022 06:58:07 -0400 (EDT) |
branch: elpa/evil
commit 214fd3bcd75bf5923654146e992bfe3576c7d3ee
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
Blockwise visual paste handles linewise text
---
evil-commands.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/evil-commands.el b/evil-commands.el
index 80a89d7005..60285a6ec8 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2247,7 +2247,7 @@ The return value is the yanked text."
(setq paste-eob t))
(evil-delete beg end (evil-visual-type) (unless
evil-kill-on-visual-paste ?_))
(when (and (eq yank-handler #'evil-yank-line-handler)
- (not (eq (evil-visual-type) 'line))
+ (not (memq (evil-visual-type) '(line block)))
(not (= evil-visual-end (point-max))))
(insert "\n"))
(evil-normal-state)
@@ -2258,6 +2258,8 @@ The return value is the yanked text."
(lambda (&rest _) text)))
(cond
((eq 'block (evil-visual-type))
+ (when (eq yank-handler #'evil-yank-line-handler)
+ (setq text (concat "\n" text)))
(evil-apply-on-block #'evil-insert-for-yank-at-col beg end t text))
(paste-eob (evil-paste-after count register))
(t (evil-paste-before count register)))))