branch: master
commit 6458c35a16dee37e0852f406196eecb2bec4374b
Author: Justin Burkett <[email protected]>
Commit: Justin Burkett <[email protected]>

    Avoid setting ivy window as minibuffer
    
    * ivy.el (ivy-completion-in-region): Don't set ivy window to minibuffer 
window
    
    Fixes #1051
---
 ivy.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index e87e38d..15ae382 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1915,7 +1915,8 @@ The previous string is between `ivy-completion-beg' and 
`ivy-completion-end'."
         (if (null (cdr comps))
             (if (string= str (car comps))
                 (message "Sole match")
-              (setf (ivy-state-window ivy-last) (selected-window))
+              (unless (minibuffer-window-active-p (selected-window))
+                (setf (ivy-state-window ivy-last) (selected-window)))
               (ivy-completion-in-region-action
                (substring-no-properties
                 (car comps))))

Reply via email to