Skip to content

Commit a5af033

Browse files
authored
Merge pull request #250085 from matthew-godin/main
fix patternIndices typo
2 parents 61a0c21 + 30e1813 commit a5af033

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/workbench/services/search/common/getFileResults.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ export const getFileResults = (
3030

3131
const results: ITextSearchResult[] = [];
3232

33-
const patternIndecies: { matchStartIndex: number; matchedText: string }[] = [];
33+
const patternIndices: { matchStartIndex: number; matchedText: string }[] = [];
3434

3535
let patternMatch: RegExpExecArray | null = null;
3636
let remainingResultQuota = options.remainingResultQuota;
3737
while (remainingResultQuota >= 0 && (patternMatch = pattern.exec(text))) {
38-
patternIndecies.push({ matchStartIndex: patternMatch.index, matchedText: patternMatch[0] });
38+
patternIndices.push({ matchStartIndex: patternMatch.index, matchedText: patternMatch[0] });
3939
remainingResultQuota--;
4040
}
4141

42-
if (patternIndecies.length) {
42+
if (patternIndices.length) {
4343
const contextLinesNeeded = new Set<number>();
4444
const resultLines = new Set<number>();
4545

@@ -56,7 +56,7 @@ export const getFileResults = (
5656
if (prevLineEnd < text.length) { lineRanges.push({ start: prevLineEnd, end: text.length }); }
5757

5858
let startLine = 0;
59-
for (const { matchStartIndex, matchedText } of patternIndecies) {
59+
for (const { matchStartIndex, matchedText } of patternIndices) {
6060
if (remainingResultQuota < 0) {
6161
break;
6262
}

0 commit comments

Comments
 (0)