Skip to content

Commit 565a7a5

Browse files
committed
Only implement "open file" when you click a file node (not a folder)
1 parent ec1fda2 commit 565a7a5

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

extensions/ql-vscode/src/queries-panel/query-tree-view-item.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ export class QueryTreeViewItem extends vscode.TreeItem {
88
this.collapsibleState = this.children.length
99
? vscode.TreeItemCollapsibleState.Collapsed
1010
: vscode.TreeItemCollapsibleState.None;
11-
this.command = {
12-
title: "Open",
13-
command: "vscode.open",
14-
arguments: [vscode.Uri.file(path)],
15-
};
11+
if (this.children.length === 0) {
12+
this.command = {
13+
title: "Open",
14+
command: "vscode.open",
15+
arguments: [vscode.Uri.file(path)],
16+
};
17+
}
1618
}
1719
}

0 commit comments

Comments
 (0)