Dispose of TerminalInstance._onExit only on instance dispose
Fixes #130277
This commit is contained in:
parent
58d4666a34
commit
1c1d04bc6f
1 changed files with 1 additions and 5 deletions
|
@ -209,11 +209,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
get icon(): TerminalIcon | undefined { return this._getIcon(); }
|
||||
get color(): string | undefined { return this._getColor(); }
|
||||
|
||||
// The onExit event is special in that it fires and is disposed after the terminal instance
|
||||
// itself is disposed
|
||||
private readonly _onExit = new Emitter<number | undefined>();
|
||||
private readonly _onExit = this._register(new Emitter<number | undefined>());
|
||||
readonly onExit = this._onExit.event;
|
||||
|
||||
private readonly _onDisposed = this._register(new Emitter<ITerminalInstance>());
|
||||
readonly onDisposed = this._onDisposed.event;
|
||||
private readonly _onProcessIdReady = this._register(new Emitter<ITerminalInstance>());
|
||||
|
@ -1333,7 +1330,6 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
}
|
||||
|
||||
this._onExit.fire(this._exitCode);
|
||||
this._onExit.dispose();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue