Code change:
Type: <bBug</bCC a new terminal and hit enter in a new line and hit enter (you must create at least two lines of code to test b/c the single line does not have this issue) UpArrow LeftArrow multiple times to test if you can hear "echo world" character by character. Notes: For NVDA and JAWS on Windows, it keeps saying "d" which is the last character. VS Code version: Code - Insiders 1.83.0-insider (, 2023-09-19T08:56:35.775Z) OS version: WindowsNT x64 10.0. Modes: <details<summarySystem Info</summary </details<details<summaryExtensions (91)</summaryExtensionVersion ------ android-dev-ext1.3.2 aiprm-lang0.0.2 Bookmarks13.4.1 openscad1.2.1 spellright3.0.118 zoterolatex0.4.1 mermaid-markdown-syntax-highlighting1.5.2 doxdocgen1.4.0 vscode-markdownlint0.51.0 vscode-eslint2.4.2 vscode-quick-select0.2.9 vscode-deno3.22.0 gitlens14.3.0 EditorConfig0.16.4 prettier-vscode10.1.0 vscode-google-translate1.4.13 codespaces1.15.3 copilot1.112.422 copilot-chat0.8. remotehub0.60.0 vscode-github-actions0.26.2 vscode-pull-request-github0.72.0 overleaf-workshop0.1.5 cslpreview0.2.2 easy-snippet0.6.3 path-autocomplete1.25.0 latex-workshop9.14.0 lilypond-syntax0.1.1 scheme0.2.0 better-cpp-syntax1.17.2 google-search0.0.1 vscode-lua-format1.3.8 lilypond-formatter0.2.3 lilypond-pdf-preview0.2.8 lilypond-snippets0.1.1 vslilypond1.7.3 zotero0.1.10 git-graph1.30.0 vscode-docker1.26.0 black-formatter2023.4.1 flake82023.6.0 isort2023.11. python2023.16.0 vscode-pylance2023.9.10 jupyter2023.8. jupyter-keymap1.1.2 jupyter-renderers1.0.17 vscode-jupyter-cell-tags0.1.8 vscode-jupyter-slideshow0.1.5 remote-containers0.311.0 remote-ssh0.106.4 remote-ssh-edit0.86.0 remote-wsl0.81.3 vscode-remote-extensionpack0.24.0 azure-repos0.36.0 cmake-tools1.15.31 cpptools1.17.5 cpptools-extension-pack1.3.0 js-debug-nightly2023.9.1317 powershell2023.6.0 remote-repositories0.38.1 vscode-github-issue-notebooks0.0.129 vscode-selfhost-test-provider0.3.18 vscode-serial-monitor0.10.0 vsliveshare1.0.5883 autodocstring0.6.1 pandocciter0.10.3 shiny-python0.1.4 shinyuieditor0.4.3 quarto1.98.0 r-debugger0.5.4 java1.22.1 vscode-xml0.26.1 r2.8.1 multi-command1.6.0 vscode-deepl1.0.6 abc-music0.4.0 lua3.7.0 latex-utilities0.4.10 cmake0.0.17 errorlens3.13.0 intellicode-api-usage-examples0.2.8 vscodeintellicode1.2.30 vscode-arduino0.6.0 vscode-java-debug0.54.0 vscode-java-dependency0.23.1 vscode-java-pack0.25.14 vscode-java-test0.39.1 vscode-maven0.42.0 markdown-all-in-one3.5.1 grammarly0.22.1 (1 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Yeah, this is acting very buggy on windows
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
repro steps as listed should work. Lmk if you have questions
Navigating left and right is fine, but after typing a command, NVDA reads out a misspelled version of the command multiple times !
reopening because marked verification-found per the process.
It's a lot better today. Closing and marking as verified. Edit: nvm, but will file a new issue for the bug.
can still repro. He's going to send me the output logs. The command decorations are off here. !
the command start line is off here, which is causing this issue. Do you know why / how that happens?
Does not reproduce for me on Windows.
this can happen sometimes on Windows. What I'd recommend is add some logic when a command starts that does a quick scan of nearby lines to re-adjust for the common PS/cmd prompt case if the current line does not look like a prompt. This is a workaround until shell integration sequences are passed through correctly by conpty.
feature as we'll want to call this out in the terminal section of the release notes

Related discussion:
text: this._logService.debug('CommandDetectionCapability#handleCommandStart', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); } <del> private _handleCommandStartWindows(): void { </del> <ins> private async _handleCommandStartWindows(): Promise<void> { </ins> this._currentCommand.commandStartX = this._terminal.buffer.active.cursorX; // On Windows track all cursor movements after the command start sequence this._commandMarkers.length = 0; <del> // HACK: Fire command started on the following frame on Windows to allow the cursor // position to update as conpty often prints the sequence on a different line to the // actual line the command started on. timeout(0).then(() => { if (!this._currentCommand.commandExecutedMarker) { this._onCursorMoveListener = this._terminal.onCursorMove(() => { if (this._commandMarkers.length === 0 || this._commandMarkers[this._commandMarkers.length - 1].line !== this._terminal.buffer.active.cursorY) { const marker = this._terminal.registerMarker(0); if (marker) { this._commandMarkers.push(marker); } } }); </del> <ins> const lastCommand = this.commands.at(-1); function cursorOnCorrectLine(terminal: Terminal): boolean { if (!lastCommand) { return false; </ins> } <del> this._currentCommand.commandStartMarker = this._terminal.registerMarker(0); if (this._currentCommand.commandStartMarker) { const line = this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line); if (line) { this._currentCommand.commandStartLineContent = line.translateToString(true); </del> <ins> const cursorYAbsolute = terminal.buffer.active.baseY + terminal.buffer.active.cursorY; // If the cursor position is within the last command, we should poll. const lastCommandYAbsolute = (lastCommand.endMarker ? lastCommand.endMarker.line : lastCommand.marker?.line) ?? -1; return cursorYAbsolute > lastCommandYAbsolute; } function lineIsPrompt(terminal: Terminal): boolean { const line = terminal.buffer.active.getLine(terminal.buffer.active.baseY + terminal.buffer.active.cursorY); if (!line) { return false; } // TODO: fine tune prompt regex to accomodate for unique configurtions. return line.translateToString(true)?.match(/^(PS.+>)|([A-Z]:.*>)/) !== null; } // Conpty could have the wrong cursor position at this point. if (!cursorOnCorrectLine(this._terminal) || !lineIsPrompt(this._terminal)) { // Poll for 200ms until the cursor position is correct. for (let i = 0; i < 20; i++) { await timeout(10); if (cursorOnCorrectLine(this._terminal) && lineIsPrompt(this._terminal)) { this._logService.debug('CommandDetectionCapability#_handleCommandStartWindows polling attempts required: ', i + 1); break; </ins> } } <del> this._onCommandStarted.fire({ marker: this._currentCommand.commandStartMarker } as ITerminalCommand); this._logService.debug('CommandDetectionCapability#_handleCommandStartWindows', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); }); </del> <ins> } else { // HACK: Fire command started on the following frame on Windows to allow the cursor // position to update as conpty often prints the sequence on a different line to the // actual line the command started on. await timeout(0); } if (!this._currentCommand.commandExecutedMarker) { this._onCursorMoveListener = this._terminal.onCursorMove(() => { if (this._commandMarkers.length === 0 || this._commandMarkers[this._commandMarkers.length - 1].line !== this._terminal.buffer.active.cursorY) { const marker = this._terminal.registerMarker(0); if (marker) { this._commandMarkers.push(marker); } } }); } this._currentCommand.commandStartMarker = this._terminal.registerMarker(0); if (this._currentCommand.commandStartMarker) { const line = this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line); if (line) { this._currentCommand.commandStartLineContent = line.translateToString(true); } } this._onCommandStarted.fire({ marker: this._currentCommand.commandStartMarker } as ITerminalCommand); this._logService.debug('CommandDetectionCapability#_handleCommandStartWindows', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); </ins> } handleGenericCommand(options?: IHandleCommandOptions): void {