branch: master
commit 4544c6975c13abadd4012ca5e2d71fd4f9a8330c
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-dispatching-done): Don't set action permanently
---
ivy.el | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index b117617..227ac3f 100644
--- 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.