diff --git a/src/vs/workbench/contrib/notebook/browser/cellRenderer.ts b/src/vs/workbench/contrib/notebook/browser/cellRenderer.ts index b50b18f2d7cd17e0168f87394eaa6bfe08678b5c..3cc700597f1dd4634a0f3a68eade42c63351a8a1 100644 --- a/src/vs/workbench/contrib/notebook/browser/cellRenderer.ts +++ b/src/vs/workbench/contrib/notebook/browser/cellRenderer.ts @@ -373,7 +373,7 @@ class StatefullMarkdownCell extends Disposable { this._register(viewCell.onDidChangeEditingState(() => { if (viewCell.isEditing) { // switch to editing mode - const width = templateData.container.clientWidth - 24 /** for scrollbar and margin right */; + const width = templateData.cellContainer.clientWidth - 24 /** for scrollbar and margin right */; const lineNum = viewCell.lineCount; const totalHeight = Math.max(lineNum + 1, 5) * 21;