Fix start cb in CustomExecution2

Fixes #77428
This commit is contained in:
Daniel Imms
2019-07-16 15:10:17 -07:00
parent 1ed9be719c
commit 48e7c6d927
7 changed files with 31 additions and 19 deletions

View File

@@ -34,13 +34,20 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
// ITerminalService listeners
this._toDispose.add(_terminalService.onInstanceCreated((instance) => {
// Delay this message so the TerminalInstance constructor has a chance to finish and
// return the ID normally to the extension host. The ID that is passed here will be used
// to register non-extension API terminals in the extension host.
setTimeout(() => {
if (instance.shellLaunchConfig.isVirtualProcess) {
// Fire events for virtual processes immediately as the extension host already knows
// about them
this._onTerminalOpened(instance);
this._onInstanceDimensionsChanged(instance);
}, EXT_HOST_CREATION_DELAY);
} else {
// Delay this message so the TerminalInstance constructor has a chance to finish and
// return the ID normally to the extension host. The ID that is passed here will be
// used to register non-extension API terminals in the extension host.
setTimeout(() => {
this._onTerminalOpened(instance);
this._onInstanceDimensionsChanged(instance);
}, EXT_HOST_CREATION_DELAY);
}
}));
this._toDispose.add(_terminalService.onInstanceDisposed(instance => this._onTerminalDisposed(instance)));