diff --git a/src/main.tsx b/src/main.tsx index a806ce67..e2542eca 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -2600,13 +2600,17 @@ class ScreenWindowView extends React.Component<{sw : ScreenWindow}, {}> { } setSize(width : number, height : number) : void { + let {sw} = this.props; + if (sw == null) { + return; + } mobx.action(() => { this.width.set(width); this.height.set(height); - let {sw} = this.props; let cols = windowWidthToCols(width, GlobalModel.termFontSize.get()); let rows = windowHeightToRows(height, GlobalModel.termFontSize.get()); - if (sw == null || cols == 0 || rows == 0) { + if (cols == 0 || rows == 0) { + console.log("cannot set sw size", rows, cols); return; } sw.termSizeCallback(rows, cols); diff --git a/src/model.ts b/src/model.ts index bd122215..011d7bd5 100644 --- a/src/model.ts +++ b/src/model.ts @@ -484,10 +484,6 @@ class ScreenWindow { } termSizeCallback(rows : number, cols : number) : void { - if (!this.isActive()) { - console.log("termSize (not active)"); - return; - } if (cols == 0 || rows == 0) { return; }