branch: externals/ivy-hydra
commit a2a3263e3df9a2c3e24de442f9bf108d023e0978
Author: honmaple <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-initial-inputs-alist): Add default behavior
Fixes #2286
---
ivy.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/ivy.el b/ivy.el
index 3bed34f..466b3f6 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2187,11 +2187,8 @@ This is useful for recursive `ivy-read'."
(sort (or (ivy-state-sort state) (assoc caller
ivy-sort-functions-alist)))
(initial-input
(or (ivy-state-initial-input state)
- (let ((init (cdr (assq caller ivy-initial-inputs-alist))))
- (cond ((functionp init)
- (funcall init))
- (t
- init)))))
+ (let ((init (ivy-alist-setting ivy-initial-inputs-alist caller)))
+ (if (functionp init) (funcall init) init))))
(def (ivy-state-def state)))
(setq ivy--extra-candidates (ivy--compute-extra-candidates caller))
(setq ivy--directory nil)