always set sw size

This commit is contained in:
sawka
2023-02-26 00:04:24 -08:00
parent 5f92086fd2
commit d11d76c670
2 changed files with 6 additions and 6 deletions
+6 -2
View File
@@ -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);
-4
View File
@@ -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;
}