diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts index 53399a5bcbf97faf8c5e21b575f3861d51cd7a3e..836494d37bffb93d5c402906229d18a91a88803d 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts @@ -144,7 +144,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod let newState: CodeCellLayoutState; let editorHeight: number; let totalHeight: number; - if (!state.editorHeight && this._layoutInfo.layoutState === CodeCellLayoutState.FromCache) { + if (!state.editorHeight && this._layoutInfo.layoutState === CodeCellLayoutState.FromCache && !state.outputHeight) { // No new editorHeight info - keep cached totalHeight and estimate editorHeight editorHeight = this.estimateEditorHeight(state.font?.lineHeight ?? this._layoutInfo.fontInfo?.lineHeight); totalHeight = this._layoutInfo.totalHeight;