[PR #16466] Fix parsing of chunked win32-input-mode sequences #30926

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

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

State: closed
Merged: Yes


Even with the previous fixes we still randomly encounter win32-
input-mode sequences that are broken up in exactly such a way that
e.g. lone escape keys are encounters. Those for instance clear the
current prompt. The remaining parts of the sequence are then visible.

This changeset fixes the issue by skipping the entire force-to-ground
code whenever we saw at least 1 win32-input-mode sequence.

Related to #16343

Validation Steps Performed

  • Host a ConPTY inside ConPTY (= double the trouble) with cmd.exe
  • Paste random amounts of text
  • In the old code spurious [..._ strings are seen
  • In the new code they're consistently gone ✅
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16466 **State:** closed **Merged:** Yes --- Even with the previous fixes we still randomly encounter win32- input-mode sequences that are broken up in exactly such a way that e.g. lone escape keys are encounters. Those for instance clear the current prompt. The remaining parts of the sequence are then visible. This changeset fixes the issue by skipping the entire force-to-ground code whenever we saw at least 1 win32-input-mode sequence. Related to #16343 ## Validation Steps Performed * Host a ConPTY inside ConPTY (= double the trouble) with cmd.exe * Paste random amounts of text * In the old code spurious `[..._` strings are seen * In the new code they're consistently gone ✅
claunia added the pull-request label 2026-01-31 09:43:52 +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#30926