Update FuzzyMatchV1 to use skip optimization used in V2

pull/1015/head
Junegunn Choi 7 years ago
parent 6c76d8cd1c
commit 6bc592e6c9
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -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

Loading…
Cancel
Save