Skip to content

Commit

Permalink
explorer: fixed 'openNode' implementation
Browse files Browse the repository at this point in the history
The following commit fixes an issue with the `explorer` where the
workspace folder node is incorrectly opened (despite not being visible) causing
an issue where the explorer is empty.

Signed-off-by: vince-fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto committed Oct 21, 2020
1 parent 60def53 commit 906e99a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/navigator/src/browser/navigator-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ export class FileNavigatorModel extends FileTreeModel {
}
}

openNode(raw?: TreeNode | undefined): void {
const node = raw || this.selectedNodes[0];
// Attempt to open nodes only if there are not explicitly hidden.
if (node.visible !== false) {
super.openNode(node);
}
}

*getNodesByUri(uri: URI): IterableIterator<TreeNode> {
const workspace = this.root;
if (WorkspaceNode.is(workspace)) {
Expand Down

0 comments on commit 906e99a

Please sign in to comment.