mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
parent
e0e7aeca17
commit
e229ffdb0e
|
@ -801,9 +801,10 @@ abstract class AbstractTreeView extends Disposable implements ITreeView {
|
||||||
|
|
||||||
this.tree!.setFocus([node]);
|
this.tree!.setFocus([node]);
|
||||||
let selected = this.canSelectMany ? this.getSelection() : [];
|
let selected = this.canSelectMany ? this.getSelection() : [];
|
||||||
if (selected.length === 0) {
|
if (!selected.find(item => item.handle === node.handle)) {
|
||||||
selected = [node];
|
selected = [node];
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = treeMenus.getResourceContextActions(selected);
|
const actions = treeMenus.getResourceContextActions(selected);
|
||||||
if (!actions.length) {
|
if (!actions.length) {
|
||||||
return;
|
return;
|
||||||
|
@ -1567,8 +1568,8 @@ class MultipleSelectionActionRunner extends ActionRunner {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!actionInSelected && selectionHandleArgs && selectionHandleArgs.length > 0) {
|
if (!actionInSelected && selectionHandleArgs) {
|
||||||
context = selectionHandleArgs[0];
|
selectionHandleArgs = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
await action.run(context, selectionHandleArgs);
|
await action.run(context, selectionHandleArgs);
|
||||||
|
|
Loading…
Reference in a new issue