Skip to content

Commit 5fd5098

Browse files
authored
Minimize execution output when there is no output for new REPL (#23786)
Resolves: #23520
1 parent 415c55b commit 5fd5098

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/client/repl/replController.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ export function createReplController(
2424
exec.start(Date.now());
2525
try {
2626
const result = await server.execute(cell.document.getText());
27-
28-
exec.replaceOutput([
29-
new vscode.NotebookCellOutput([vscode.NotebookCellOutputItem.text(result, 'text/plain')]),
30-
]);
27+
if (result !== '') {
28+
exec.replaceOutput([
29+
new vscode.NotebookCellOutput([vscode.NotebookCellOutputItem.text(result, 'text/plain')]),
30+
]);
31+
}
3132
exec.end(true);
3233
} catch (err) {
3334
const error = err as Error;

0 commit comments

Comments
 (0)