Skip to content

Commit 4d19e8f

Browse files
anthonykim1eleanorjboyd
authored andcommitted
Minimize execution output when there is no output for new REPL (microsoft#23786)
Resolves: microsoft#23520
1 parent ac7730c commit 4d19e8f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/client/repl/replController.ts

+5-4
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)