From c56f5ea118bd0cfa5d05bbe72292ad665b19f7a0 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 28 Apr 2021 14:56:27 -0700 Subject: [PATCH] fix #122359. --- .../contrib/notebook/browser/viewModel/codeCellViewModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts index 53399a5bcbf..836494d37bf 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; -- GitLab