diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2022-08-07 21:08:35 +0100 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2022-08-07 22:16:49 +0200 |
| commit | fdf8a72b6d8525788a651fef135a0eecf647505b (patch) | |
| tree | e23bc3c24ff3523c83965573f30b4222331010cf | |
| parent | 48c9286a5b1f0e74c8260b29cbc8025681e15094 (diff) | |
Never kill on visual paste when using evil-paste-before
This is pretty new in Vim (Jan 2022)
| -rw-r--r-- | evil-commands.el | 4 | ||||
| -rw-r--r-- | evil-vars.el | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/evil-commands.el b/evil-commands.el index ddf5603..89eae27 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 251652b..caa4fb8 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) |
