use var args and spread for editor command extra arguments all the way (#169532)

(actually) fixes https://github.com/microsoft/vscode/issues/167564
This commit is contained in:
Johannes Rieken
2022-12-19 14:07:33 +01:00
committed by GitHub
parent 0bfe4199ac
commit 34c9b3f400
4 changed files with 5 additions and 5 deletions

View File

@@ -452,7 +452,7 @@ export abstract class EditorAction2 extends Action2 {
return editor.invokeWithinContext((editorAccessor) => {
const kbService = editorAccessor.get(IContextKeyService);
if (kbService.contextMatchesRules(withNullAsUndefined(this.desc.precondition))) {
return this.runEditorCommand(editorAccessor, editor!, args);
return this.runEditorCommand(editorAccessor, editor!, ...args);
}
});
}