]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix recursive minibuffer exit with "C-g"
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 17 Dec 2015 10:35:24 +0000 (11:35 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 17 Dec 2015 10:35:24 +0000 (11:35 +0100)
* ivy.el (ivy-read): Make it so e.g. "C-h f C-h v C-g" goes back to the
  describe-function selection.

ivy.el

diff --git a/ivy.el b/ivy.el
index 6fd361bf2b17c37aab60df7431284e89b720dd07..a0bbbd81723e20b4ca050f621873f7a7431493f1 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -1151,7 +1151,10 @@ customizations apply to the current completion session."
                    res)))
           (remove-hook 'post-command-hook #'ivy--exhibit)
           (when (setq unwind (ivy-state-unwind ivy-last))
-            (funcall unwind)))
+            (funcall unwind))
+          (unless (eq ivy-exit 'done)
+            (when recursive-ivy-last
+              (ivy--reset-state (setq ivy-last recursive-ivy-last)))))
       (ivy-call)
       (when (and recursive-ivy-last
                  ivy-recursive-restore)