branch: master
commit 9ca6f48c7957fe7e9e0d7b83f81a15a961c35249
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Allow "C-g" to interrupt ivy-dispatching-done
* ivy.el (ivy-dispatching-done): Update.
---
ivy.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ivy.el b/ivy.el
index 8e24f1f..5f8e5de 100644
--- a/ivy.el
+++ b/ivy.el
@@ -286,11 +286,13 @@ When non-nil, it should contain one %d.")
"\n"))
(key (string (read-key hint)))
(action (assoc key (cdr actions))))
- (if (null action)
- (error "%s is not bound" key)
- (message "")
- (ivy-set-action (nth 1 action))
- (ivy-done))))))
+ (cond ((string= key ""))
+ ((null action)
+ (error "%s is not bound" key))
+ (t
+ (message "")
+ (ivy-set-action (nth 1 action))
+ (ivy-done)))))))
(defun ivy-build-tramp-name (x)
"Reconstruct X into a path.