aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/on_enter.ts
diff options
context:
space:
mode:
authorGregoire Geis <[email protected]>2020-02-03 19:24:50 +0000
committerGregoire Geis <[email protected]>2020-02-03 19:24:50 +0000
commitb70ad7e5f3d524204fab88fe2a8c5a6fbef9e88e (patch)
treed01119552b4963f58834f4f8af14b674cbd9773c /editors/code/src/commands/on_enter.ts
parent58c007674b8c746beab371ca13fce951af6cd1f2 (diff)
Remove enableEnhancedTyping and type overriding infrastructure.
Diffstat (limited to 'editors/code/src/commands/on_enter.ts')
-rw-r--r--editors/code/src/commands/on_enter.ts10
1 files changed, 1 insertions, 9 deletions
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts
index 1b3d3d741..ac582b423 100644
--- a/editors/code/src/commands/on_enter.ts
+++ b/editors/code/src/commands/on_enter.ts
@@ -26,17 +26,9 @@ async function handleKeypress(ctx: Ctx) {
26 return true; 26 return true;
27} 27}
28 28
29export function onEnterOverride(ctx: Ctx): Cmd {
30 return async (event: { text: string }) => {
31 if (event.text === '\n') {
32 handleKeypress(ctx);
33 }
34 };
35}
36
37export function onEnter(ctx: Ctx): Cmd { 29export function onEnter(ctx: Ctx): Cmd {
38 return async () => { 30 return async () => {
39 if (handleKeypress(ctx)) return; 31 if (await handleKeypress(ctx)) return;
40 32
41 await vscode.commands.executeCommand('default:type', { text: '\n' }); 33 await vscode.commands.executeCommand('default:type', { text: '\n' });
42 }; 34 };