Skip to content

Commit

Permalink
Don't auto expand if it's root in indexTreeModel. Fixes #79540
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 committed Aug 21, 2019
1 parent 98467c3 commit 2ebaa78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/tree/indexTreeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, 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++) {
Expand Down

0 comments on commit 2ebaa78

Please sign in to comment.