branch: master
commit 714f9f83803a7a1429e3a2e38dab3510cafe9cfb
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el: ivy-initial-inputs-alist should use caller first
    
    Fixes #1068
---
 counsel.el | 3 ---
 ivy.el     | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/counsel.el b/counsel.el
index 594aeb3..7414916 100644
--- a/counsel.el
+++ b/counsel.el
@@ -764,9 +764,6 @@ By default `counsel-bookmark' opens a dired buffer for 
directories."
   "Ivy version of `execute-extended-command'.
 Optional INITIAL-INPUT is the initial input in the minibuffer."
   (interactive)
-  (unless initial-input
-    (setq initial-input (cdr (assoc this-command
-                                    ivy-initial-inputs-alist))))
   (let* ((cands obarray)
          (pred 'commandp)
          (sort t))
diff --git a/ivy.el b/ivy.el
index f33f23d..48ff255 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1655,7 +1655,7 @@ This is useful for recursive `ivy-read'."
         (caller (ivy-state-caller state))
         (def (ivy-state-def state)))
     (unless initial-input
-      (setq initial-input (cdr (assoc this-command
+      (setq initial-input (cdr (assoc (or caller this-command)
                                       ivy-initial-inputs-alist))))
     (setq ivy--directory nil)
     (setq ivy-case-fold-search ivy-case-fold-search-default)

Reply via email to