* ivy.el (ivy-call): For some commands that depend on the buffer, like
`counsel-git-grep' the action needs to be performed in
`ivy-state-window'. However, this results in wrong window for M-x calc.
Add a workaround until I figure out why this happens.
Fixes #176
(consp (car collection)))
(cdr (assoc ivy--current collection))
ivy--current)))
- (with-selected-window (ivy-state-window ivy-last)
- (funcall action x))))))
+ (if (eq (ivy-state-history ivy-last) 'extended-command-history)
+ (funcall action x)
+ (with-selected-window (ivy-state-window ivy-last)
+ (funcall action x)))))))
(defun ivy-next-line-and-call (&optional arg)
"Move cursor vertically down ARG candidates.