emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master adad288 27/63: ivy.el (ivy-call): Add selected-window work


From: Oleh Krehel
Subject: [elpa] master adad288 27/63: ivy.el (ivy-call): Add selected-window work-around for M-x
Date: Fri, 21 Aug 2015 12:08:37 +0000

branch: master
commit adad288b69785a02e7207bfc00390f6ddb0429a8
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-call): Add selected-window work-around for M-x
    
    * 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
---
 ivy.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 59221e2..8237704 100644
--- a/ivy.el
+++ b/ivy.el
@@ -550,8 +550,10 @@ If the input is empty, select the previous history element 
instead."
                          (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]