diff --git a/src/commands/common.ts b/src/commands/common.ts index b41f99a..780da3c 100644 --- a/src/commands/common.ts +++ b/src/commands/common.ts @@ -271,7 +271,7 @@ export abstract class EditorCommand extends Disposable { const subscriptions = []; for (const cmd of command) { - subscriptions.push(commands.registerCommand(cmd, (editor: TextEditor, edit: TextEditorEdit, ...args: any[]) => this._execute(cmd, editor, edit, ...args), this)); + subscriptions.push(commands.registerTextEditorCommand(cmd, (editor: TextEditor, edit: TextEditorEdit, ...args: any[]) => this._execute(cmd, editor, edit, ...args), this)); } this._disposable = Disposable.from(...subscriptions); }