From 9df25241be5685ca04f18b82c382a38e1be50b94 Mon Sep 17 00:00:00 2001 From: andreamah Date: Thu, 3 Oct 2024 16:38:10 -0700 Subject: [PATCH] fix collapse states --- src/vs/workbench/contrib/search/browser/searchView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index 9604683c0950f..d5a0919045a2b 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -1007,8 +1007,9 @@ export class SearchView extends ViewPane { const viewer = this.getControl(); const navigator = viewer.navigate(); let node = navigator.first(); + const shouldShowAI = this.shouldShowAIResults(); do { - if (node && !viewer.isCollapsed(node) && (this.shouldShowAIResults() && !(node instanceof TextSearchResult))) { + if (node && !viewer.isCollapsed(node) && (!shouldShowAI || !(node instanceof TextSearchResult))) { // ignore the ai text search result id return true; }