Fix flickering when resizing markdown cell

after it has been in edit mode
This commit is contained in:
Rob Lourens 2020-07-22 12:10:44 -07:00
parent 8d6b507dfb
commit cc1008a283

View file

@ -95,7 +95,7 @@ export class StatefullMarkdownCell extends Disposable {
this._register(viewCell.onDidChangeLayout((e) => {
const layoutInfo = this.editor?.getLayoutInfo();
if (e.outerWidth && layoutInfo && layoutInfo.width !== viewCell.layoutInfo.editorWidth) {
if (e.outerWidth && this.viewCell.editState === CellEditState.Editing && layoutInfo && layoutInfo.width !== viewCell.layoutInfo.editorWidth) {
this.onCellEditorWidthChange();
} else if (e.totalHeight || e.outerWidth) {
this.relayoutCell();