branch: elpa/evil-iedit-state
commit 681ad14fc93d89881c6f4e92b6faa7b3bdbacd51
Author: duianto <duia...@users.noreply.github.com>
Commit: Sylvain Benner <sylvain.ben...@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