File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/notebook/browser/view/renderers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,28 +293,27 @@ export class CodeCell extends Disposable {
293293
294294 private onCellWidthChange ( ) : void {
295295 const realContentHeight = this . templateData . editor ! . getContentHeight ( ) ;
296+ this . viewCell . editorHeight = realContentHeight ;
297+ this . relayoutCell ( ) ;
298+
296299 this . layoutEditor (
297300 {
298301 width : this . viewCell . layoutInfo . editorWidth ,
299302 height : realContentHeight
300303 }
301304 ) ;
302-
303- this . viewCell . editorHeight = realContentHeight ;
304- this . relayoutCell ( ) ;
305305 }
306306
307307 private onCellHeightChange ( newHeight : number ) : void {
308308 const viewLayout = this . templateData . editor ! . getLayoutInfo ( ) ;
309+ this . viewCell . editorHeight = newHeight ;
310+ this . relayoutCell ( ) ;
309311 this . layoutEditor (
310312 {
311313 width : viewLayout . width ,
312314 height : newHeight
313315 }
314316 ) ;
315-
316- this . viewCell . editorHeight = newHeight ;
317- this . relayoutCell ( ) ;
318317 }
319318
320319 renderOutput ( currOutput : IProcessedOutput , index : number , beforeElement ?: HTMLElement ) {
Original file line number Diff line number Diff line change @@ -310,13 +310,13 @@ export class StatefullMarkdownCell extends Disposable {
310310 let viewLayout = this . editor ! . getLayoutInfo ( ) ;
311311
312312 if ( e . contentHeightChanged ) {
313+ this . viewCell . editorHeight = e . contentHeight ;
313314 this . editor ! . layout (
314315 {
315316 width : viewLayout . width ,
316317 height : e . contentHeight
317318 }
318319 ) ;
319- this . viewCell . editorHeight = e . contentHeight ;
320320 }
321321 } ) ) ;
322322
You can’t perform that action at this time.
0 commit comments