Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/rTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,8 @@ export async function chooseTerminal(): Promise<vscode.Terminal> {
}

if (rTerm === undefined) {
const success = await createRTerm(true);
await createRTerm(true);
await delay(200); // Let RTerm warm up
if (!success) {
return undefined;
}
}

return rTerm;
Expand Down
4 changes: 3 additions & 1 deletion src/rstudioapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ export async function sendCodeToRTerminal(code: string, focus: boolean) {
await runTextInTerm(code);
if (focus) {
const rTerm = await chooseTerminal();
rTerm.show();
if (rTerm !== undefined) {
rTerm.show();
}
}
}

Expand Down