提交 e58fca86 编写于 作者: R rebornix

Fix infinite loop in notebook cell rendering.

上级 f78c4706
......@@ -40,7 +40,10 @@ export class CodeCell extends Disposable {
const width = this.viewCell.layoutInfo.editorWidth;
const lineNum = this.viewCell.lineCount;
const lineHeight = this.viewCell.layoutInfo.fontInfo?.lineHeight || 17;
const totalHeight = lineNum * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING;
const totalHeight = this.viewCell.layoutInfo.editorHeight === 0
? lineNum * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING
: this.viewCell.layoutInfo.editorHeight;
this.layoutEditor(
{
width: width,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册