[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil 197e5c111e 3/5: Update markers when blockwise visual
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil 197e5c111e 3/5: Update markers when blockwise visual pasting |
Date: |
Mon, 18 Apr 2022 06:58:07 -0400 (EDT) |
branch: elpa/evil
commit 197e5c111efdcc5a86f1f02749acd695991192e0
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
Update markers when blockwise visual pasting
---
evil-commands.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/evil-commands.el b/evil-commands.el
index 60285a6ec8..aebb40aa8d 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2213,10 +2213,12 @@ The return value is the yanked text."
(setq evil-last-paste nil))
(and (> (length text) 0) text)))))
-(defun evil-insert-for-yank-at-col (startcol _endcol string)
+(defun evil-insert-for-yank-at-col (startcol _endcol string count)
"Insert STRING at STARTCOL."
(move-to-column startcol)
- (insert-for-yank string))
+ (dotimes (_ (or count 1))
+ (insert-for-yank string))
+ (evil-set-marker ?\] (1- (point))))
(evil-define-command evil-visual-paste (count &optional register)
"Paste over Visual selection."
@@ -2260,7 +2262,8 @@ The return value is the yanked text."
((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))
+ (evil-set-marker ?\[ beg)
+ (evil-apply-on-block #'evil-insert-for-yank-at-col beg end t text
count))
(paste-eob (evil-paste-after count register))
(t (evil-paste-before count register)))))
(when evil-kill-on-visual-paste