fix terminal bug

This commit is contained in:
Xuan Sang LE 2020-05-21 22:34:35 +02:00
parent d9246bf422
commit 73233e48f2
6 changed files with 9 additions and 4 deletions

View File

@ -68,7 +68,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/wTerm/README.md", "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/wTerm/README.md",
"category": "System", "category": "System",
"author": "Xuan Sang LE", "author": "Xuan Sang LE",
"version": "0.0.2-a", "version": "0.0.3-a",
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/wTerm/build/release/wTerm.zip" "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/wTerm/build/release/wTerm.zip"
} }

View File

@ -61,6 +61,7 @@
}); });
return m.show(e); return m.show(e);
}; };
this.resizeContent();
this.openSession(); this.openSession();
if (!this.systemsetting.desktop.menu[this.name]) { if (!this.systemsetting.desktop.menu[this.name]) {
@ -107,6 +108,9 @@
this.fitAddon.fit(); this.fitAddon.fit();
ncol = this.term.cols; ncol = this.term.cols;
nrow = this.term.rows; nrow = this.term.rows;
if (!this.socket) {
return;
}
return this.socket.send(`s${ncol}:${nrow}`); return this.socket.send(`s${ncol}:${nrow}`);
} }

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE", "author": "Xuan Sang LE",
"email": "xsang.le@gmail.com" "email": "xsang.le@gmail.com"
}, },
"version":"0.0.2-a", "version":"0.0.3-a",
"category":"System", "category":"System",
"iconclass":"fa fa-terminal", "iconclass":"fa fa-terminal",
"mimes":["none"], "mimes":["none"],

Binary file not shown.

View File

@ -43,7 +43,7 @@ class wTerm extends this.OS.GUI.BaseApplication
return unless e return unless e
@mctxHandle e.data.item.get "data" @mctxHandle e.data.item.get "data"
m.show e m.show e
@resizeContent()
@openSession() @openSession()
# make desktop menu if not exist # make desktop menu if not exist
@ -70,6 +70,7 @@ class wTerm extends this.OS.GUI.BaseApplication
@fitAddon.fit() @fitAddon.fit()
ncol = @term.cols ncol = @term.cols
nrow = @term.rows nrow = @term.rows
return unless @socket
@socket.send "s#{ncol}:#{nrow}" @socket.send "s#{ncol}:#{nrow}"
openSession: () -> openSession: () ->

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE", "author": "Xuan Sang LE",
"email": "xsang.le@gmail.com" "email": "xsang.le@gmail.com"
}, },
"version":"0.0.2-a", "version":"0.0.3-a",
"category":"System", "category":"System",
"iconclass":"fa fa-terminal", "iconclass":"fa fa-terminal",
"mimes":["none"], "mimes":["none"],