explorer check if parent is input before expanding and revealing it

This commit is contained in:
isidor 2020-04-14 12:06:27 +02:00
parent 00409b06b9
commit 3d08fa1a32

View file

@ -266,8 +266,10 @@ export class ExplorerView extends ViewPane {
const isEditing = !!this.explorerService.getEditableData(e);
if (isEditing) {
await this.tree.expand(e.parent!);
this.tree.reveal(e.parent!);
if (e.parent !== this.tree.getInput()) {
await this.tree.expand(e.parent!);
this.tree.reveal(e.parent!);
}
} else {
DOM.removeClass(treeContainer, 'highlight');
}