From 2ebaa78e8753efa3c224a755d2f8527486f76afd Mon Sep 17 00:00:00 2001 From: jeanp413 Date: Tue, 20 Aug 2019 20:57:33 -0500 Subject: [PATCH] Don't auto expand if it's root in indexTreeModel. Fixes #79540 --- src/vs/base/browser/ui/tree/indexTreeModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/tree/indexTreeModel.ts b/src/vs/base/browser/ui/tree/indexTreeModel.ts index a568881e7c2ff..bdf19be09f5de 100644 --- a/src/vs/base/browser/ui/tree/indexTreeModel.ts +++ b/src/vs/base/browser/ui/tree/indexTreeModel.ts @@ -219,7 +219,7 @@ export class IndexTreeModel, TFilterData = voi const result = this._setListNodeCollapsed(node, listIndex, revealed, collapsed!, recursive || false); - if (this.autoExpandSingleChildren && !collapsed! && !recursive) { + if (node !== this.root && this.autoExpandSingleChildren && !collapsed! && !recursive) { let onlyVisibleChildIndex = -1; for (let i = 0; i < node.children.length; i++) {