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

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

[elpa] master 9ceb7ee 42/90: Fix yank/undo bug


From: Oleh Krehel
Subject: [elpa] master 9ceb7ee 42/90: Fix yank/undo bug
Date: Tue, 30 Jun 2015 07:28:24 +0000

branch: master
commit 9ceb7ee85d7fe926dba68024daacc1e98a5e01c6
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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")
 



reply via email to

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