branch: master
commit 16367fc3c1f372dfc03f4121832753f44ed27df9
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    ivy.el (ivy-call): Call ivy-recursive-restore even if no action
    
    Suppose an (ivy-read "test: " '("1" "2" "3")) is done when another
    `ivy-read' is in progress. In that case, after the first `ivy-read'
    returns a string, we should restore the state of the first `ivy-read'.
    
    Re #1932
---
 ivy.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index cba806b..e49764c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1307,7 +1307,8 @@ will be called for each element of this list.")
                   (t
                    current))))
         (if (eq action #'identity)
-            (funcall action x)
+            (prog1 x
+              (ivy-recursive-restore))
           (select-window (ivy--get-window ivy-last))
           (set-buffer (ivy-state-buffer ivy-last))
           (prog1 (unwind-protect

Reply via email to