Commit b39408e
committed
fix: Correct exact match detection in fzf algorithm
The previous condition 'sidx === 0 && eidx === textLength' incorrectly
identified subsequence matches spanning the entire text as exact matches.
For example, searching 'path' in 'pxyath' would trigger the boost incorrectly.
The correct condition 'textLength === patternLength' ensures that when all
pattern characters match as a subsequence and both strings have the same
length, it must be an exact match.1 parent 06f2293 commit b39408e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments