Add regular onEnter command, allowing onEnter to be called without overriding the type command.

This commit is contained in:
Gregoire Geis 2020-02-02 02:21:04 +01:00
parent b090ee5a65
commit 23ef22dd48
3 changed files with 42 additions and 21 deletions

View file

@ -21,6 +21,7 @@ export async function activate(context: vscode.ExtensionContext) {
ctx.registerCommand('expandMacro', commands.expandMacro);
ctx.registerCommand('run', commands.run);
ctx.registerCommand('reload', commands.reload);
ctx.registerCommand('onEnter', commands.onEnter);
// Internal commands which are invoked by the server.
ctx.registerCommand('runSingle', commands.runSingle);
@ -29,7 +30,7 @@ export async function activate(context: vscode.ExtensionContext) {
ctx.registerCommand('selectAndApplySourceChange', commands.selectAndApplySourceChange);
if (ctx.config.enableEnhancedTyping) {
ctx.overrideCommand('type', commands.onEnter);
ctx.overrideCommand('type', commands.onEnterOverride);
}
activateStatusDisplay(ctx);