Don't allow layout to be called with negative dimensions

This commit is contained in:
Matt Bierner 2020-05-05 14:36:42 -07:00
parent db2c4cbe63
commit fea66b2660

View file

@ -1604,7 +1604,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Forward to controls
this.layoutTitleAreaControl(width);
this.editorControl.layout(new Dimension(this.dimension.width, this.dimension.height - this.titleAreaControl.getPreferredHeight()));
this.editorControl.layout(new Dimension(this.dimension.width, Math.max(0, this.dimension.height - this.titleAreaControl.getPreferredHeight())));
}
private layoutTitleAreaControl(width: number): void {