[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4a810a6 1/5: Add an optimization to speed up matching
From: |
Oleh Krehel |
Subject: |
[elpa] master 4a810a6 1/5: Add an optimization to speed up matching |
Date: |
Mon, 20 Apr 2015 14:13:22 +0000 |
branch: master
commit 4a810a6ffdc25630cf438429250bf5aa08d2ac35
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Add an optimization to speed up matching
* ivy.el (ivy-completions): Update.
---
ivy.el | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ivy.el b/ivy.el
index 6717cf6..e9da976 100644
--- a/ivy.el
+++ b/ivy.el
@@ -582,7 +582,11 @@ CANDIDATES is a list of strings."
ivy--old-cands)
((and ivy--old-re
(not (equal ivy--old-re ""))
- (eq 0 (cl-search ivy--old-re re)))
+ (memq (cl-search
+ (if (string-match "\\\\)$" ivy--old-re)
+ (substring ivy--old-re 0 -2)
+ ivy--old-re)
+ re) '(0 2)))
(ignore-errors
(cl-remove-if-not
(lambda (x) (string-match re x))