File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,12 +23,14 @@ export function createReplController(
2323 const exec = controller . createNotebookCellExecution ( cell ) ;
2424 exec . start ( Date . now ( ) ) ;
2525
26- const result = await server . execute ( cell . document . getText ( ) ) ;
26+ const code = cell . document . getText ( ) ;
27+ const result = await server . execute ( code ) ;
2728
2829 if ( result ?. output ) {
29- exec . replaceOutput ( [
30- new vscode . NotebookCellOutput ( [ vscode . NotebookCellOutputItem . text ( result . output , 'text/plain' ) ] ) ,
31- ] ) ;
30+ const stdoutItem = vscode . NotebookCellOutputItem . stdout ( result . output ) ;
31+ ( stdoutItem as any ) . metadata = { scrollable : false } ;
32+ const output = new vscode . NotebookCellOutput ( [ stdoutItem ] , { scrollable : false } ) ;
33+ exec . replaceOutput ( [ output ] ) ;
3234 // TODO: Properly update via NotebookCellOutputItem.error later.
3335 }
3436
You can’t perform that action at this time.
0 commit comments