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

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

[elpa] master e70ca07 003/167: ivy.el (ivy-call): "C-M-n" should not lea


From: Oleh Krehel
Subject: [elpa] master e70ca07 003/167: ivy.el (ivy-call): "C-M-n" should not leave the minibuffer
Date: Tue, 08 Dec 2015 10:49:32 +0000

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

    ivy.el (ivy-call): "C-M-n" should not leave the minibuffer
    
    Make sure that the minibuffer window remains selected as long as the
    completion hasn't finished.
    For example, "<f1> f" to call `counsel-describe-function' input
    "forward" and spam "C-M-n" to read the doc for each function that starts
    with "forward". The *Help* window popup would move the window focus, but
    this change moves it back to the minibuffer.
---
 ivy.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 1bb3326..9b3e698 100644
--- a/ivy.el
+++ b/ivy.el
@@ -604,7 +604,11 @@ If the input is empty, select the previous history element 
instead."
                   (if (equal ivy--current "")
                       ivy-text
                     ivy--current))))
-        (funcall action x)))))
+        (prog1 (funcall action x)
+          (unless (or (eq ivy-exit 'done)
+                      (equal (selected-window)
+                             (active-minibuffer-window)))
+            (select-window (active-minibuffer-window))))))))
 
 (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]