branch: master
commit 1c09e99153b36626fcb3d272973e7ef3cb5ee679
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy-call): Use select-window, not with-ivy-window
    
    Since `with-ivy-window' relies on `with-selected-window', which restores
    the window state. This is bad if the purpose of the action was to change
    the selected window.
    
    So now we use only the first part of `with-ivy-window', which
    is (select-window (ivy--get-window ivy-last)).
    
    Fixes #639
---
 ivy.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 64d3429..a48d63a 100644
--- a/ivy.el
+++ b/ivy.el
@@ -955,7 +955,8 @@ Example use:
                      ivy-text)
                     (t
                      ivy--current))))
-          (prog1 (with-ivy-window (funcall action x))
+          (select-window (ivy--get-window ivy-last))
+          (prog1 (funcall action x)
             (unless (or (eq ivy-exit 'done)
                         (equal (selected-window)
                                (active-minibuffer-window))

Reply via email to