fix missing markdown cell rendering on restore.

This commit is contained in:
rebornix 2021-08-11 18:53:38 -07:00
parent 183cb1bfa8
commit b4aa5aee57

View file

@ -129,7 +129,7 @@ export class MarkupCellViewModel extends BaseCellViewModel implements ICellViewM
? this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(initialNotebookLayoutInfo.width)
: 0,
bottomToolbarOffset: bottomToolbarGap,
totalHeight: 0
totalHeight: 1
};
this._register(this.onDidChangeState(e => {
@ -182,7 +182,7 @@ export class MarkupCellViewModel extends BaseCellViewModel implements ICellViewM
private _updateTotalHeight(newHeight: number) {
if (newHeight !== this.layoutInfo.totalHeight) {
this.layoutChange({ totalHeight: newHeight });
this.layoutChange({ totalHeight: Math.max(1, newHeight) });
}
}