Skip to content

Commit

Permalink
Minimize execution output when there is no output for new REPL (#23786)
Browse files Browse the repository at this point in the history
Resolves: #23520
  • Loading branch information
anthonykim1 authored Jul 11, 2024
1 parent 415c55b commit 5fd5098
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/client/repl/replController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export function createReplController(
exec.start(Date.now());
try {
const result = await server.execute(cell.document.getText());

exec.replaceOutput([
new vscode.NotebookCellOutput([vscode.NotebookCellOutputItem.text(result, 'text/plain')]),
]);
if (result !== '') {
exec.replaceOutput([
new vscode.NotebookCellOutput([vscode.NotebookCellOutputItem.text(result, 'text/plain')]),
]);
}
exec.end(true);
} catch (err) {
const error = err as Error;
Expand Down

0 comments on commit 5fd5098

Please sign in to comment.