@basthon/console-react 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gui/gui.js +1 -1
- package/lib/gui/terminal.d.ts +1 -1
- package/lib/gui/terminal.js +7 -9
- package/package.json +1 -1
package/lib/gui/gui.js
CHANGED
package/lib/gui/terminal.d.ts
CHANGED
package/lib/gui/terminal.js
CHANGED
|
@@ -103,7 +103,7 @@ export default class Terminal {
|
|
|
103
103
|
else {
|
|
104
104
|
this._term.set_prompt(this._kernel.ps1());
|
|
105
105
|
this.resetBuffer();
|
|
106
|
-
this.launch(source, true);
|
|
106
|
+
await this.launch(source, true);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
@@ -176,19 +176,17 @@ export default class Terminal {
|
|
|
176
176
|
/**
|
|
177
177
|
* Launch code in terminal.
|
|
178
178
|
*/
|
|
179
|
-
launch(code, interactive = true) {
|
|
179
|
+
async launch(code, interactive = true) {
|
|
180
180
|
this._stopWaitInput();
|
|
181
|
+
await this._kernel.ready();
|
|
181
182
|
if (!interactive)
|
|
182
183
|
this.showScript(code);
|
|
183
184
|
this.pause();
|
|
184
185
|
this._term.set_prompt("");
|
|
185
|
-
(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
interactive: interactive,
|
|
190
|
-
});
|
|
191
|
-
})();
|
|
186
|
+
this._kernel.dispatchEvent("eval.request", {
|
|
187
|
+
code: code,
|
|
188
|
+
interactive: interactive,
|
|
189
|
+
});
|
|
192
190
|
}
|
|
193
191
|
/**
|
|
194
192
|
* Give focus to terminal.
|