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

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

[nongnu] elpa/evil-iedit-state 681ad14fc9 19/32: Update paste-replace, h


From: ELPA Syncer
Subject: [nongnu] elpa/evil-iedit-state 681ad14fc9 19/32: Update paste-replace, handle empty kill ring
Date: Mon, 12 Dec 2022 20:59:26 -0500 (EST)

branch: elpa/evil-iedit-state
commit 681ad14fc93d89881c6f4e92b6faa7b3bdbacd51
Author: duianto <duianto@users.noreply.github.com>
Commit: Sylvain Benner <sylvain.benner@gmail.com>

    Update paste-replace, handle empty kill ring
    
    Don't delete the occurrences when the kill-ring is empty (nil).
---
 evil-iedit-state.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/evil-iedit-state.el b/evil-iedit-state.el
index 161722868a..a2d12f5f05 100644
--- a/evil-iedit-state.el
+++ b/evil-iedit-state.el
@@ -151,7 +151,7 @@ If INTERACTIVE is non-nil then COMMAND is called 
interactively."
 (defun evil-iedit-state/paste-replace (count)
   "Replace the selection with the yanked text."
   (interactive "P")
-  (iedit-delete-occurrences)
+  (when kill-ring (iedit-delete-occurrences))
   (evil-paste-before count))
 
 ;; expand-region integration, add an "e" command



reply via email to

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