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

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

[elpa] master 4492054 167/399: ivy.el (ivy--recompute-index): Speed up


From: Oleh Krehel
Subject: [elpa] master 4492054 167/399: ivy.el (ivy--recompute-index): Speed up
Date: Sat, 20 Jul 2019 14:57:16 -0400 (EDT)

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

    ivy.el (ivy--recompute-index): Speed up
---
 ivy.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index c48c5e3..423c2ec 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3242,9 +3242,10 @@ RE-STR is the regexp, CANDS are the current candidates."
         (preselect (ivy-state-preselect ivy-last))
         (current (ivy-state-current ivy-last))
         (empty (string= name "")))
-    (unless (eq this-command 'ivy-resume)
+    (unless (memq this-command '(ivy-resume ivy-partial-or-done))
       (ivy-set-index
-       (if (string= name "")
+       (if (or (string= name "")
+               (and (> (length cands) 10000) (eq func 
#'ivy-recompute-index-zero)))
            0
          (or
           (cl-position (ivy--remove-prefix "^" name)



reply via email to

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