From 1c09e99153b36626fcb3d272973e7ef3cb5ee679 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 29 Aug 2016 11:34:33 +0200 Subject: [PATCH] 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 64d34292..a48d63a6 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))