branch: master
commit 9ceb7ee85d7fe926dba68024daacc1e98a5e01c6
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Fix yank/undo bug
* ivy.el (ivy--insert-minibuffer): Bind `buffer-undo-list' later.
Previously, "C-y C-u" would result in the first char of yanked text not
being undone.
---
ivy.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index c4ff814..4e646d0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1105,7 +1105,6 @@ Should be run via minibuffer `post-command-hook'."
(defun ivy--insert-minibuffer (text)
"Insert TEXT into minibuffer with appropriate cleanup."
(let ((resize-mini-windows nil)
- (buffer-undo-list t)
(update-fn (ivy-state-update-fn ivy-last))
deactivate-mark)
(ivy--cleanup)
@@ -1114,9 +1113,10 @@ Should be run via minibuffer `post-command-hook'."
(ivy--insert-prompt)
;; Do nothing if while-no-input was aborted.
(when (stringp text)
- (save-excursion
- (forward-line 1)
- (insert text)))))
+ (let ((buffer-undo-list t))
+ (save-excursion
+ (forward-line 1)
+ (insert text))))))
(declare-function colir-blend-face-background "ext:colir")