Fix active terminal event when switching between split terminals

Fixes #128301
This commit is contained in:
Daniel Imms 2021-07-23 07:00:38 -07:00
parent a4efb44108
commit b1b4c5a351

View file

@ -432,10 +432,8 @@ export class TerminalGroup extends Disposable implements ITerminalGroup {
const oldActiveInstance = this.activeInstance;
this._activeInstanceIndex = index;
if (force) {
if (oldActiveInstance !== this.activeInstance) {
this._onInstancesChanged.fire();
}
if (oldActiveInstance !== this.activeInstance || force) {
this._onInstancesChanged.fire();
this._onDidChangeActiveInstance.fire(this.activeInstance);
}
}