[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7d909e7 1/5: Add work-around for DEF not being in COLLECTI
From: |
Oleh Krehel |
Subject: |
[elpa] master 7d909e7 1/5: Add work-around for DEF not being in COLLECTION for `completing-read' |
Date: |
Fri, 17 Apr 2015 11:50:05 +0000 |
branch: master
commit 7d909e7837728294de13cfee88389fb2582c747d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Add work-around for DEF not being in COLLECTION for `completing-read'
* ivy.el (ivy-read): Update.
---
ivy.el | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ivy.el b/ivy.el
index 390af9c..ac631f6 100644
--- a/ivy.el
+++ b/ivy.el
@@ -238,6 +238,10 @@ UPDATE-FN is called each time the current candidate(s) is
changed."
(error "Hash table as a collection unsupported"))
((listp (car collection))
(setq collection (all-completions "" collection predicate))))
+ (when preselect
+ (unless (or ivy-require-match
+ (all-completions preselect collection))
+ (setq collection (cons preselect collection))))
(cl-case (length collection)
(0 nil)
(1 (car collection))