mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-01 08:26:35 +00:00
fix: align sidebar search matching
This commit is contained in:
@@ -31,6 +31,9 @@ function matchesSubsequence(text: string, query: string): boolean {
|
||||
|
||||
let j = 0;
|
||||
for (let i = 0; i < text.length && j < query.length; i++) {
|
||||
if (isWordBoundary(text, i) && i > 0) {
|
||||
j = 0;
|
||||
}
|
||||
if (text[i] === query[j]) j++;
|
||||
}
|
||||
return j === query.length;
|
||||
|
||||
Reference in New Issue
Block a user