emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil fdf8a72b6d: Never kill on visual paste when using evi


From: ELPA Syncer
Subject: [nongnu] elpa/evil fdf8a72b6d: Never kill on visual paste when using evil-paste-before
Date: Sun, 7 Aug 2022 16:58:28 -0400 (EDT)

branch: elpa/evil
commit fdf8a72b6d8525788a651fef135a0eecf647505b
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>

    Never kill on visual paste when using evil-paste-before
    
    This is pretty new in Vim (Jan 2022)
---
 evil-commands.el | 4 +++-
 evil-vars.el     | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index ddf5603ce4..89eae27b6a 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2131,7 +2131,9 @@ The return value is the yanked text."
   (interactive "*P<x>")
   (setq count (prefix-numeric-value count))
   (if (evil-visual-state-p)
-      (evil-visual-paste count register)
+      ;; This is the only difference with evil-paste-after in visual-state
+      (let ((evil-kill-on-visual-paste nil))
+        (evil-visual-paste count register))
     (evil-with-undo
       (let* ((text (if register
                        (evil-get-register register)
diff --git a/evil-vars.el b/evil-vars.el
index 251652b9d2..caa4fb8641 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -451,7 +451,8 @@ before point."
 (defcustom evil-kill-on-visual-paste t
   "Whether pasting in visual state adds the replaced text to the
 kill ring, making it the default for the next paste. The default,
-replicates the default Vim behavior."
+replicates the default Vim behavior for `p'. This is ignored by
+`evil-paste-before' (\\[evil-paste-before]) which never kills on visual paste."
   :type 'boolean
   :group 'evil)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]