From 73233e48f282b3d817c46339ca01066e963c2f12 Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Thu, 21 May 2020 22:34:35 +0200 Subject: [PATCH] fix terminal bug --- packages.json | 2 +- wTerm/build/debug/main.js | 4 ++++ wTerm/build/debug/package.json | 2 +- wTerm/build/release/wTerm.zip | Bin 604596 -> 604674 bytes wTerm/main.coffee | 3 ++- wTerm/package.json | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages.json b/packages.json index 999a198..6026f05 100644 --- a/packages.json +++ b/packages.json @@ -68,7 +68,7 @@ "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/wTerm/README.md", "category": "System", "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" } diff --git a/wTerm/build/debug/main.js b/wTerm/build/debug/main.js index b3abec8..71fab2e 100644 --- a/wTerm/build/debug/main.js +++ b/wTerm/build/debug/main.js @@ -61,6 +61,7 @@ }); return m.show(e); }; + this.resizeContent(); this.openSession(); if (!this.systemsetting.desktop.menu[this.name]) { @@ -107,6 +108,9 @@ this.fitAddon.fit(); ncol = this.term.cols; nrow = this.term.rows; + if (!this.socket) { + return; + } return this.socket.send(`s${ncol}:${nrow}`); } diff --git a/wTerm/build/debug/package.json b/wTerm/build/debug/package.json index c924f19..332faa6 100644 --- a/wTerm/build/debug/package.json +++ b/wTerm/build/debug/package.json @@ -6,7 +6,7 @@ "author": "Xuan Sang LE", "email": "xsang.le@gmail.com" }, - "version":"0.0.2-a", + "version":"0.0.3-a", "category":"System", "iconclass":"fa fa-terminal", "mimes":["none"], diff --git a/wTerm/build/release/wTerm.zip b/wTerm/build/release/wTerm.zip index 2ecdea214c908301bf77fb24ac1a23a7ee03394c..5b13d6658c90937e4f7f449f5bdd4d22015f9ec8 100644 GIT binary patch delta 258 zcmdn;S*7WV3QvGHGYc032v{$f$a9g&X350+tw6Fljj=tA5rmn5n0b2|Bg>j*p!jx? zRu%yPUYjLb1LU>NXs=zs!mxI`;Z&B(?92sH|u($tP$O6QyK+Fcj?A!k>uc1_B2KiW&&d7?P-iGYnp-L+eKPg z1O#|Js<#Go@qHZ=3$ll=B&*(e|fioF^E822Wpa!D$YnUs!OOf@pb5P7@Fv3Zzl( kn?B8wQ$rqRP&X3;0|@hgeE}opO}}f&DbE&c!3h)r081H6QUCw| diff --git a/wTerm/main.coffee b/wTerm/main.coffee index 79ed95c..f2a9d9b 100644 --- a/wTerm/main.coffee +++ b/wTerm/main.coffee @@ -43,7 +43,7 @@ class wTerm extends this.OS.GUI.BaseApplication return unless e @mctxHandle e.data.item.get "data" m.show e - + @resizeContent() @openSession() # make desktop menu if not exist @@ -70,6 +70,7 @@ class wTerm extends this.OS.GUI.BaseApplication @fitAddon.fit() ncol = @term.cols nrow = @term.rows + return unless @socket @socket.send "s#{ncol}:#{nrow}" openSession: () -> diff --git a/wTerm/package.json b/wTerm/package.json index c924f19..332faa6 100644 --- a/wTerm/package.json +++ b/wTerm/package.json @@ -6,7 +6,7 @@ "author": "Xuan Sang LE", "email": "xsang.le@gmail.com" }, - "version":"0.0.2-a", + "version":"0.0.3-a", "category":"System", "iconclass":"fa fa-terminal", "mimes":["none"],