Skip to content

Commit 2cbee3a

Browse files
authored
Update terminal.js
1 parent ebf8b39 commit 2cbee3a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/terminal.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ export default class PIOTerminal {
2626
}
2727

2828
sendText(text) {
29-
if (!this._instance || this._instance.exitStatus !== undefined) {
30-
this._instance = this.new();
31-
// Set Codepage to UTF-8, if Windows is used
32-
if (process.platform === "win32") {
33-
this._instance.sendText('chcp 65001');
29+
if (!this._instance || this._instance.exitStatus !== undefined) {
30+
this._instance = this.new();
31+
// Set Codepage to UTF-8, if Windows is used
32+
if (process.platform === "win32") {
33+
this._instance.sendText('chcp 65001');
34+
}
3435
}
36+
this._instance.sendText(text);
37+
this._instance.show();
3538
}
36-
this._instance.sendText(text);
37-
this._instance.show();
38-
}
3939

4040
dispose() {
4141
if (this._instance) {

0 commit comments

Comments
 (0)