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

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

[elpa] master 691b12c 02/31: ivy.el (ivy-read): Fixup preselect addition


From: Oleh Krehel
Subject: [elpa] master 691b12c 02/31: ivy.el (ivy-read): Fixup preselect addition
Date: Fri, 01 May 2015 14:28:40 +0000

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

    ivy.el (ivy-read): Fixup preselect addition
    
    It was unnecessarily inserting `preselect' when completing tags.
---
 ivy.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 6e3d111..e1d6837 100644
--- a/ivy.el
+++ b/ivy.el
@@ -474,7 +474,9 @@ When SORT is t, refer to `ivy-sort-functions-alist' for 
sorting."
               (setq coll (cl-sort (copy-sequence coll) sort-fn))))))
     (when preselect
       (unless (or require-match
-                  (member preselect coll))
+                  (cl-find-if `(lambda (x)
+                                 (string-match ,(format "^%s" preselect) x))
+                              coll))
         (setq coll (cons preselect coll))))
     (setq ivy--index (or
                       (and preselect



reply via email to

[Prev in Thread] Current Thread [Next in Thread]