Browse Source

Bugfix: make sure setting terminal widget sessions happens synchronously.

Afshin Darian 8 years ago
parent
commit
1a280002c3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/terminal/index.ts

+ 2 - 3
src/terminal/index.ts

@@ -84,9 +84,8 @@ class TerminalWidget extends Widget {
     if (!value) {
       return;
     }
-
-    value.ready.then(() => {
-      this._session = value;
+    this._session = value;
+    this._session.ready.then(() => {
       this._session.messageReceived.connect(this._onMessage, this);
       this.title.label = `Terminal ${this._session.name}`;
       this._resizeTerminal(-1, -1);