256
const wordSeparators = searchData.wordSeparators;
257
if (!captureMatches && searchData.simpleSearch) {
259
>
const searchStringLen = searchString.length;
260
>
const textLength = text.length;
261
>
262
>
let lastMatchIndex = -searchStringLen;
263
>
while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {
264
>
if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {
265
>
result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);
266
>
if (resultLen >= limitResultCount) {
267
return resultLen;
268
}
270
>
}
271
>
return resultLen;
272
>
}
273
274
const searcher = new Searcher(searchData.wordSeparators, searchData.regex);