[PR #16105] Fix UIA and marks regressions due to cooked read #30839

Open
opened 2026-01-31 09:43:17 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16105

State: closed
Merged: Yes


The initial cooked read (= conhost readline) rewrite had two flaws:

  • Using viewport scrolls under ConPTY to avoid emitting newlines resulted in various bugs around marks, coloring, etc. It's still somewhat unclear why this happened, but the next issue is related and much worse.
  • Rewriting the input line every time causes problems with accessibility tools, as they'll re-announce unchanged parts again and again.

The solution to these is to simply stop writing the unchanged parts of the prompt. To do this, code was added to measure the size of text without actually inserting them into the buffer. Since this meant that the "interactive" mode of WriteCharsLegacy would need to be duplicated for the new code, I instead moved those parts into COOKED_READ_DATA. That way we can now have the interactive transform of the prompt (= Ctrl+C -> ^C) and the two text functions (measure text & actually write text) are now agnostic to this transformation.

Closes #16034
Closes #16044

Validation Steps Performed

  • A vision impaired user checked it out and it seemed fine ✅
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16105 **State:** closed **Merged:** Yes --- The initial cooked read (= conhost readline) rewrite had two flaws: * Using viewport scrolls under ConPTY to avoid emitting newlines resulted in various bugs around marks, coloring, etc. It's still somewhat unclear why this happened, but the next issue is related and much worse. * Rewriting the input line every time causes problems with accessibility tools, as they'll re-announce unchanged parts again and again. The solution to these is to simply stop writing the unchanged parts of the prompt. To do this, code was added to measure the size of text without actually inserting them into the buffer. Since this meant that the "interactive" mode of `WriteCharsLegacy` would need to be duplicated for the new code, I instead moved those parts into `COOKED_READ_DATA`. That way we can now have the interactive transform of the prompt (= Ctrl+C -> ^C) and the two text functions (measure text & actually write text) are now agnostic to this transformation. Closes #16034 Closes #16044 ## Validation Steps Performed * A vision impaired user checked it out and it seemed fine ✅
claunia added the pull-request label 2026-01-31 09:43:17 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30839