Fix Terminal.processId when setProcessId has not yet been called

Part of #12770
This commit is contained in:
Daniel Imms
2016-09-28 19:10:34 -07:00
parent a6d6ea86db
commit 8763d8411f

View File

@@ -40,9 +40,11 @@ export class ExtHostTerminal implements vscode.Terminal {
if (this._processId) {
return Promise.resolve<number>(this._processId);
}
setTimeout(() => {
return this.processId;
}, 200);
return new Promise<number>((resolve) => {
setTimeout(() => {
this.processId.then(resolve);
}, 200);
});
}
public sendText(text: string, addNewLine: boolean = true): void {