Skip to content

Commit

Permalink
Merge pull request #198371 from microsoft/merogge/bug
Browse files Browse the repository at this point in the history
check if active instance before updating / showing accessible view on dynamic terminal content
  • Loading branch information
meganrogge authored Nov 16, 2023
2 parents 0701bc6 + 9c47447 commit 4f1065b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,19 @@ export class TerminalAccessibleViewContribution extends Disposable implements IT
addon.activate(xterm.raw);
this._xterm = xterm;
this._register(this._xterm.raw.onWriteParsed(async () => {
if (this._terminalService.activeInstance !== this._instance) {
return;
}
if (this._isTerminalAccessibleViewOpen() && this._xterm!.raw.buffer.active.baseY === 0) {
this.show();
}
}));

const onRequestUpdateEditor = Event.latch(this._xterm.raw.onScroll);
this._register(onRequestUpdateEditor(() => {
if (this._terminalService.activeInstance !== this._instance) {
return;
}
if (this._isTerminalAccessibleViewOpen()) {
this.show();
}
Expand Down

0 comments on commit 4f1065b

Please sign in to comment.