Skip to content

Commit

Permalink
Override yank handlers when pasting
Browse files Browse the repository at this point in the history
The pasted text may specify a yank handler, e.g., evil-yank-line-handler,
that inserts the text outside of the current overlay.  It is necessary to
override any such yank handler in order to ensure that the text replaces
the current overlay and gets propagated to the other overlays.

* evil-iedit-state.el (evil-iedit-state/paste-replace): Specify
insert-for-yank as the yank handler when calling evil-paste-before.
  • Loading branch information
Miciah authored and syl20bnr committed Aug 20, 2020
1 parent 9009b60 commit 2d252e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evil-iedit-state.el
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ If INTERACTIVE is non-nil then COMMAND is called interactively."
"Replace the selection with the yanked text."
(interactive "P")
(when kill-ring (iedit-delete-occurrences))
(evil-paste-before count))
(evil-paste-before count nil '(#'insert-as-yank)))

;; expand-region integration, add an "e" command
;;;###autoload
Expand Down

0 comments on commit 2d252e1

Please sign in to comment.