]> code.delx.au - gnu-emacs-elpa/commitdiff
Allow "C-g" to interrupt ivy-dispatching-done
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 23 Jul 2015 13:25:29 +0000 (15:25 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 23 Jul 2015 13:25:52 +0000 (15:25 +0200)
* ivy.el (ivy-dispatching-done): Update.

ivy.el

diff --git a/ivy.el b/ivy.el
index 8e24f1fca7442ecafc5aa812dad314c92aea2d18..5f8e5deed9379f6b2a85955276182f155741623d 100644 (file)
--- 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 "\a"))
+              ((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.