[Top][All Lists]

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

[elpa] master 0d410d3 047/272: ivy.el (ivy-flx-limit): Configure when fl

From: Oleh Krehel
Subject: [elpa] master 0d410d3 047/272: ivy.el (ivy-flx-limit): Configure when flx is used
Date: Mon, 25 Apr 2016 10:13:16 +0000

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

    ivy.el (ivy-flx-limit): Configure when flx is used
    Re #207
 ivy.el |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index f48459f..d43f60f 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2033,11 +2033,16 @@ Prefix matches to NAME are put ahead of the list."
   "List of `ivy' faces for minibuffer group matches.")
+(defvar ivy-flx-limit 200
+  "Used to conditionally turn off flx sorting.
+When the amount of matching candidates is larger than this
+number, no sorting will be done.")
 (defun ivy--flx-sort (name cands)
   "Sort according to closeness to string NAME the string list CANDS."
   (condition-case nil
       (if (and cands
-               (< (length cands) 200))
+               (< (length cands) ivy-flx-limit))
           (let* ((flx-name (if (string-match "^\\^" name)
                                (substring name 1)

reply via email to

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