Fix terminal detach session

Fixes #137204
This commit is contained in:
Daniel Imms 2021-11-15 01:17:52 -08:00
parent 5243c4021a
commit ddd2f5901e
3 changed files with 5 additions and 1 deletions

View file

@ -234,7 +234,7 @@ export class PtyService extends Disposable implements IPtyService {
}
async detachFromProcess(id: number): Promise<void> {
this._throwIfNoPty(id).detach();
return this._throwIfNoPty(id).detach();
}
async reduceConnectionGraceTime(): Promise<void> {

View file

@ -916,7 +916,10 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
async detachFromProcess(): Promise<void> {
// Detach the process and dispose the instance, without the instance dispose the terminal
// won't go away
await this._processManager.detachFromProcess();
this.dispose();
}
focus(force?: boolean): void {

View file

@ -167,6 +167,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
async detachFromProcess(): Promise<void> {
await this._process?.detach?.();
this._process = null;
}
async createProcess(