Skip to content

Commit e58fca8

Browse files
committed
Fix infinite loop in notebook cell rendering.
1 parent f78c470 commit e58fca8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/vs/workbench/contrib/notebook/browser/view/renderers

src/vs/workbench/contrib/notebook/browser/view/renderers/codeCell.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ export class CodeCell extends Disposable {
4040
const width = this.viewCell.layoutInfo.editorWidth;
4141
const lineNum = this.viewCell.lineCount;
4242
const lineHeight = this.viewCell.layoutInfo.fontInfo?.lineHeight || 17;
43-
const totalHeight = lineNum * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING;
43+
const totalHeight = this.viewCell.layoutInfo.editorHeight === 0
44+
? lineNum * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING
45+
: this.viewCell.layoutInfo.editorHeight;
46+
4447
this.layoutEditor(
4548
{
4649
width: width,

0 commit comments

Comments
 (0)