Change:
CC NVDA. terminal. directory to anywhere having lots of files and sub-directories. soon as typing , press Shift+Tab to focus in the terminal a11y buffer. Ctrl+End to go to the end of the buffer and see if it reflects the last file name of the command: It is not actualy. Tab to terminal input and Shift+Tab to come back to a11y output buffer: This time the last line of the buffer reflects the the last item on the screen. The terminal a11y buffer needs to get updated automatically without manual focus refresh. Version: 1.75.0-insider (system setup) Commit: Date: 2023-01-26T05:23:05.014Z Electron: 19.1.9 Chromium: 102.0.5005.194 16.14.2 V8: 10.2.154.23-electron.0 OS: Windows_NT x64 10.0. Sandboxed: Yes
Performance isn't a concern but since it's an edge case I think it makes sense to listen for buffer changes and refresh it. We will probably need to append and not replace though
Another problem encountered is that if I type some text in the accessibility buffer, it is no longer updated. It seems that the problem only happens if the text is typed very close to the last line of the buffer. I tried to reproduce the problem by typing a text at the beginning of the buffer but I couldn't. To reproduce try the following steps: some commands in the VSCode terminal. the shift+tab keys and explore the accessibility buffer using the arrow keys. Note that the executed commands result are present as expected. the cursor to the last line of the buffer and type any garbage. tab and run more commands in the terminal. the shift+tab keys and explore the accessibility buffer. In my environment the result of the commands executed in step 4 are not present in the accessibility buffer, only the commands executed in step 1 are shown.
Please treat this as a significant bug and not an "edge case". It's currently impossible to review the log of any running task or command until the task completes or the shell prompt is returned. That eliminates access to many common things like: man pages python or node in interactive mode logs of significant builds or test suites development watch tasks
this is a plan item for the March iteration IE we plan to tackle it soon
Repro: the accessible buffer, focus the terminal, focus the accessible buffer again it doesn't update
This still repros for me on Windows (without Narrator enabled): +Tab while step 2 is running :bug: accessible buffer contents are incomplete If I click away from the VS Code window and then click back into it, the accessible buffer updates
this is when I'm typing in the editor. this should instead check if the accessible buffer is visible, which it did originally
This still repros for me with the latest insiders.
a gif would be helpful https://user-
https://user- (in the recording above, at about the 6 second mark I click out of the terminal and back in, and that apparently forces an update)
can you repro if you start with a new terminal, don't run ? i'm trying exactly what you show and not seeing an issue - in the latest insider's (as of 2 hours ago)
I can repro but it's quite difficult, there's probably some race condition where output occurs before the listener is registered. I suggest we action this as part of the _getContent testing/refactoring
Considering this verified because it works in most cases and we will have a TPI next iteration to test the improvements we plan to make

Discussion:
} })); this.add(this._xterm.raw.onWriteParsed(async () => { <del> if (this._focusedContextKey.get()) { </del> <ins> if (this._accessibleBuffer.classList.contains(CssClass.Active)) { </ins> await this._updateEditor(true); } }));