提交 f175024b 编写于 作者: A Alex Ross

Change custom view multiselect array to have all selected

Fixes #79982
上级 3b439a8c
...@@ -6886,7 +6886,7 @@ declare module 'vscode' { ...@@ -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, * 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 * 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; canSelectMany?: boolean;
} }
......
...@@ -856,12 +856,7 @@ class MultipleSelectionActionRunner extends ActionRunner { ...@@ -856,12 +856,7 @@ class MultipleSelectionActionRunner extends ActionRunner {
const selection = this.getSelectedResources(); const selection = this.getSelectedResources();
let selectionHandleArgs: TreeViewItemHandleArg[] | undefined = undefined; let selectionHandleArgs: TreeViewItemHandleArg[] | undefined = undefined;
if (selection.length > 1) { if (selection.length > 1) {
selectionHandleArgs = []; selectionHandleArgs = selection.map(selected => { return { $treeViewId: context.$treeViewId, $treeItemHandle: selected.handle }; });
selection.forEach(selected => {
if (selected.handle !== context.$treeItemHandle) {
selectionHandleArgs!.push({ $treeViewId: context.$treeViewId, $treeItemHandle: selected.handle });
}
});
} }
return action.run(...[context, selectionHandleArgs]); return action.run(...[context, selectionHandleArgs]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册