Skip to content

Commit

Permalink
ivy.el (ivy-call): Use select-window, not with-ivy-window
Browse files Browse the repository at this point in the history
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
  • Loading branch information
abo-abo committed Aug 29, 2016
1 parent 36b00cb commit 1c09e99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1c09e99

Please sign in to comment.