From a189e5dfe899babf7bf636bfd810be008298f8d4 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 28 Jul 2020 10:54:17 -0700 Subject: [PATCH] Fix cell width change not handled correctly when the editor is collapsed --- .../contrib/notebook/browser/viewModel/codeCellViewModel.ts | 3 ++- 1 file changed, 2 insertions(+), 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 eea7e449e1e..e941147a358 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts @@ -143,11 +143,12 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod const outputContainerOffset = CELL_TOP_MARGIN + COLLAPSED_INDICATOR_HEIGHT; const totalHeight = CELL_TOP_MARGIN + COLLAPSED_INDICATOR_HEIGHT + CELL_BOTTOM_MARGIN + BOTTOM_CELL_TOOLBAR_HEIGHT + outputTotalHeight; const bottomToolbarOffset = totalHeight - BOTTOM_CELL_TOOLBAR_HEIGHT - BOTTOM_CELL_TOOLBAR_OFFSET; + const editorWidth = state.outerWidth !== undefined ? this.computeEditorWidth(state.outerWidth) : this._layoutInfo?.editorWidth; this._layoutInfo = { fontInfo: state.font || null, editorHeight: this._layoutInfo.editorHeight, - editorWidth: this._layoutInfo.editorWidth, + editorWidth, outputContainerOffset, outputTotalHeight, totalHeight,