Update FuzzyMatchV1 to use skip optimization used in V2

This commit is contained in:
Junegunn Choi committed 2017-08-12 00:28:30 +09:00
1 parent 6c76d8cd1c
commit 6bc592e6c9
1 file changed
+3
+3
View File
@@ -586,6 +586,9 @@ func FuzzyMatchV1(caseSensitive bool, normalize bool, forward bool, text util.Ch
if len(pattern) == 0 {
return Result{0, 0, 0}, nil
}
if asciiFuzzyIndex(&text, pattern, caseSensitive) < 0 {
return Result{-1, -1, 0}, nil
}
pidx := 0
sidx := -1