From 809db2993bc0f4ef6c4d9ec2211caa673010b19f Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Tue, 10 Nov 2020 12:08:59 -0800 Subject: [PATCH] fixup! --- src/vs/workbench/services/search/common/search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/search/common/search.ts b/src/vs/workbench/services/search/common/search.ts index 259af6cff37..31040e096e6 100644 --- a/src/vs/workbench/services/search/common/search.ts +++ b/src/vs/workbench/services/search/common/search.ts @@ -286,7 +286,7 @@ export class TextSearchMatch implements ITextSearchMatch { lastEnd = previewEnd; } - this.preview = { text: result, matches: matches.length === 1 ? matches[0] : matches }; + this.preview = { text: result, matches: Array.isArray(this.ranges) ? matches : matches[0] }; } else { const firstMatchLine = Array.isArray(range) ? range[0].startLineNumber : range.startLineNumber;