Ensure xterm exists before creating WindowsShellHelper

This commit is contained in:
Daniel Imms 2017-12-27 07:38:17 -08:00
parent fe28c5c502
commit 7cf2a99139

View file

@ -153,16 +153,16 @@ export class TerminalInstance implements ITerminalInstance {
this._initDimensions();
this._createProcess();
if (platform.isWindows) {
this._processReady.then(() => {
if (!this._isDisposed) {
this._windowsShellHelper = new WindowsShellHelper(this._processId, this, this._xterm);
}
});
}
this._xtermReadyPromise = this._createXterm();
this._xtermReadyPromise.then(() => {
if (platform.isWindows) {
this._processReady.then(() => {
if (!this._isDisposed) {
this._windowsShellHelper = new WindowsShellHelper(this._processId, this, this._xterm);
}
});
}
// Only attach xterm.js to the DOM if the terminal panel has been opened before.
if (_container) {
this.attachToElement(_container);