branch: master
commit e5105efd187edb4a9c8c5e63c07be073d831db82
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
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)))