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

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

[elpa] master e5105ef 054/167: Don't re-anchor to matching old candidate


From: Oleh Krehel
Subject: [elpa] master e5105ef 054/167: Don't re-anchor to matching old candidate if flx is on
Date: Tue, 08 Dec 2015 10:49:51 +0000

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

    Don't re-anchor to matching old candidate if flx is on
    
    * ivy.el (ivy--recompute-index): If `flx' is in position to select the
      "best" candidate, don't re-anchor to the still-matching previous
      candidate.
    
    Fixes #263
---
 ivy.el |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index 7420afe..ead3742 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1639,6 +1639,9 @@ CANDIDATES are assumed to be static."
                    #'ivy-recompute-index-zero)))
     (setq ivy--index
           (or (and (not (string= name ""))
+                   (not (and (require 'flx nil 'noerror)
+                             (eq ivy--regex-function 'ivy--regex-fuzzy)
+                             (< (length cands) 200)))
                    (cl-position (nth ivy--index ivy--old-cands)
                                 cands))
               (funcall func re-str cands)))



reply via email to

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