Skip to content

Commit

Permalink
Merge pull request #79542 from jeanp413/fix-autoexpand-indexTreeModel
Browse files Browse the repository at this point in the history
Don't auto expand if it's root in indexTreeModel
  • Loading branch information
isidorn authored Aug 21, 2019
2 parents 9f79255 + 2ebaa78 commit 4f8d04e
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 4f8d04e

Please sign in to comment.