Wait to signal to the extHostTerminalService that the terminal is opened until the terminal has a name. (#58983)

Also added a change listener for title. Fixes #53057
This commit is contained in:
Alex Ross
2018-09-21 14:08:38 -07:00
committed by GitHub
parent 4cd9739394
commit 1ff175f094
7 changed files with 52 additions and 18 deletions

View File

@@ -115,6 +115,10 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
return this._name;
}
public set name(name: string) {
this._name = name;
}
public get processId(): Thenable<number> {
return this._pidPromise;
}
@@ -313,6 +317,13 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
}
}
public $acceptTerminalTitleChange(id: number, name: string): void {
const extHostTerminal = this._getTerminalObjectById(this.terminals, id);
if (extHostTerminal) {
extHostTerminal.name = name;
}
}
public $acceptTerminalClosed(id: number): void {
const index = this._getTerminalObjectIndexById(this.terminals, id);
if (index === null) {