mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 02:26:04 +00:00
parent
3b439a8c49
commit
f175024b4d
2
src/vs/vscode.d.ts
vendored
2
src/vs/vscode.d.ts
vendored
|
@ -6886,7 +6886,7 @@ declare module 'vscode' {
|
|||
/**
|
||||
* Whether the tree supports multi-select. When the tree supports multi-select and a command is executed from the tree,
|
||||
* the first argument to the command is the tree item that the command was executed on and the second argument is an
|
||||
* array containing the other selected tree items.
|
||||
* array containing all selected tree items.
|
||||
*/
|
||||
canSelectMany?: boolean;
|
||||
}
|
||||
|
|
|
@ -856,12 +856,7 @@ class MultipleSelectionActionRunner extends ActionRunner {
|
|||
const selection = this.getSelectedResources();
|
||||
let selectionHandleArgs: TreeViewItemHandleArg[] | undefined = undefined;
|
||||
if (selection.length > 1) {
|
||||
selectionHandleArgs = [];
|
||||
selection.forEach(selected => {
|
||||
if (selected.handle !== context.$treeItemHandle) {
|
||||
selectionHandleArgs!.push({ $treeViewId: context.$treeViewId, $treeItemHandle: selected.handle });
|
||||
}
|
||||
});
|
||||
selectionHandleArgs = selection.map(selected => { return { $treeViewId: context.$treeViewId, $treeItemHandle: selected.handle }; });
|
||||
}
|
||||
|
||||
return action.run(...[context, selectionHandleArgs]);
|
||||
|
|
Loading…
Reference in a new issue