diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 8ef400154d6..b843faa1662 100644 --- a/src/vs/workbench/contrib/search/common/searchModel.ts +++ b/src/vs/workbench/contrib/search/common/searchModel.ts @@ -1118,7 +1118,7 @@ function textSearchResultToMatches(rawMatch: ITextSearchMatch, fileMatch: FileMa const previewLines = rawMatch.preview.text.split('\n'); if (Array.isArray(rawMatch.ranges)) { return rawMatch.ranges.map((r, i) => { - const previewRange: ISearchRange = rawMatch.preview.matches[i]; + const previewRange: ISearchRange = (rawMatch.preview.matches)[i]; return new Match(fileMatch, previewLines, previewRange, r); }); } else {