branch: master
commit 778c325d401e93e5fd55e11a5b8cff43dcee21d3
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-call): Don't switch windows for 'identity action
Fixes #690
---
ivy.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/ivy.el b/ivy.el
index 6cfd985..e11e8d9 100644
--- a/ivy.el
+++ b/ivy.el
@@ -959,13 +959,15 @@ Example use:
ivy-text)
(t
ivy--current))))
- (select-window (ivy--get-window ivy-last))
- (prog1 (funcall action x)
- (unless (or (eq ivy-exit 'done)
- (equal (selected-window)
- (active-minibuffer-window))
- (null (active-minibuffer-window)))
- (select-window (active-minibuffer-window)))))))))
+ (if (eq action 'identity)
+ (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))
+ (null (active-minibuffer-window)))
+ (select-window (active-minibuffer-window))))))))))
(defun ivy-next-line-and-call (&optional arg)
"Move cursor vertically down ARG candidates.