Skip to content

Commit

Permalink
Merge pull request #152791 from jeanp413/fix-152785
Browse files Browse the repository at this point in the history
Fixes detaching a terminal editor doesn't fire vscode.window.onDidCloseTerminal event
  • Loading branch information
Tyriar authored Jun 21, 2022
2 parents d5a75f2 + 8beecf1 commit aae33f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,11 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {


override dispose(immediate?: boolean): void {
if (this._isDisposed) {
return;
}
this._isDisposed = true;

this._logService.trace(`terminalInstance#dispose (instanceId: ${this.instanceId})`);
dispose(this._linkManager);
this._linkManager = undefined;
Expand Down Expand Up @@ -1318,10 +1323,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
// hasn't happened yet
this._onProcessExit(undefined);

if (!this._isDisposed) {
this._isDisposed = true;
this._onDisposed.fire(this);
}
this._onDisposed.fire(this);

super.dispose();
}

Expand Down

0 comments on commit aae33f1

Please sign in to comment.