]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-dispatching-done): Don't set action permanently
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 11 Nov 2015 14:46:22 +0000 (15:46 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 11 Nov 2015 14:46:22 +0000 (15:46 +0100)
ivy.el

diff --git a/ivy.el b/ivy.el
index b117617a5451f1a597d27849232a2229252fc741..227ac3fdbdf9a8f7dff3eeb9430b4b7ec4517e2e 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -360,9 +360,10 @@ When non-nil, it should contain one %d.")
   "Select one of the available actions and call `ivy-call'."
   (interactive)
   (let ((actions (copy-sequence (ivy-state-action ivy-last))))
-    (ivy-read-action)
-    (ivy-call)
-    (ivy-set-action actions)))
+    (unwind-protect
+         (when (ivy-read-action)
+           (ivy-call))
+      (ivy-set-action actions))))
 
 (defun ivy-build-tramp-name (x)
   "Reconstruct X into a path.