Merge remote-tracking branch 'origin/master' into pr/lramos15/77664

This commit is contained in:
Daniel Imms
2019-07-24 14:11:29 -07:00
13 changed files with 99 additions and 33 deletions

View File

@@ -338,8 +338,8 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
return terminal;
}
public attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess) {
const terminal = this._getTerminalById(id);
public async attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess): Promise<void> {
const terminal = this._getTerminalByIdEventually(id);
if (!terminal) {
throw new Error(`Cannot resolve terminal with id ${id} for virtual process`);
}
@@ -621,6 +621,10 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
}
public async $startVirtualProcess(id: number, initialDimensions: ITerminalDimensionsDto | undefined): Promise<void> {
// Make sure the ExtHostTerminal exists so onDidOpenTerminal has fired before we call
// TerminalVirtualProcess.start
await this._getTerminalByIdEventually(id);
// Processes should be initialized here for normal virtual process terminals, however for
// tasks they are responsible for attaching the virtual process to a terminal so this
// function may be called before tasks is able to attach to the terminal.