Skip to content

Commit 6f902cd

Browse files
committed
Revert "Fixes microsoft#152785"
This ended up causing an issue where terminals could not be destroyed. This reverts commit 8beecf1.
1 parent 32d13d5 commit 6f902cd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/vs/workbench/contrib/terminal/browser/terminalInstance.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,11 +1312,6 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
13121312

13131313

13141314
override dispose(immediate?: boolean): void {
1315-
if (this._isDisposed) {
1316-
return;
1317-
}
1318-
this._isDisposed = true;
1319-
13201315
this._logService.trace(`terminalInstance#dispose (instanceId: ${this.instanceId})`);
13211316
dispose(this._linkManager);
13221317
this._linkManager = undefined;
@@ -1355,8 +1350,10 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
13551350
// hasn't happened yet
13561351
this._onProcessExit(undefined);
13571352

1358-
this._onDisposed.fire(this);
1359-
1353+
if (!this._isDisposed) {
1354+
this._isDisposed = true;
1355+
this._onDisposed.fire(this);
1356+
}
13601357
super.dispose();
13611358
}
13621359

0 commit comments

Comments
 (0)