Skip to content

Commit

Permalink
properly add to disposables
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed May 23, 2024
1 parent 910783b commit e270705
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client/extensionActivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function activateFeatures(ext: ExtensionState, _components: Components):

registerReplCommands(ext.disposables, interpreterService);
registerReplExecuteOnEnter(ext.disposables, interpreterService);
registerReplExecuteOnShiftEnter();
registerReplExecuteOnShiftEnter(ext.disposables);
}

/// //////////////////////////
Expand Down
10 changes: 6 additions & 4 deletions src/client/repl/replCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,12 @@ export async function registerReplExecuteOnEnter(
);
}

export async function registerReplExecuteOnShiftEnter(): Promise<void> {
commands.registerCommand(Commands.Exec_In_REPL_Shift_Enter, async () => {
await commands.executeCommand(Commands.Exec_In_REPL_Enter);
});
export async function registerReplExecuteOnShiftEnter(disposables: Disposable[]): Promise<void> {
disposables.push(
commands.registerCommand(Commands.Exec_In_REPL_Shift_Enter, async () => {
await commands.executeCommand(Commands.Exec_In_REPL_Enter);
}),
);
}

function isMultiLineText(textEditor: TextEditor | undefined): boolean {
Expand Down

0 comments on commit e270705

Please sign in to comment.