Skip to content

Commit 9b4f2fc

Browse files
committed
Fix microsoft#64158 - expand search filematch when there was only one filematch
1 parent 0b43b16 commit 9b4f2fc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vs/workbench/parts/search/browser/searchView.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,9 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
12731273

12741274
// Do final render, then expand if just 1 file with less than 50 matches
12751275
this.onSearchResultsChanged();
1276-
if (this.viewModel.searchResult.count() === 1) {
1276+
1277+
const collapseResults = this.configurationService.getValue<ISearchConfigurationProperties>('search').collapseResults;
1278+
if (collapseResults !== 'alwaysCollapse' && this.viewModel.searchResult.matches().length === 1) {
12771279
const onlyMatch = this.viewModel.searchResult.matches()[0];
12781280
if (onlyMatch.count() < 50) {
12791281
this.tree.expand(onlyMatch);

0 commit comments

Comments
 (0)