ConPTY pass-through sequences are being truncated #4116
Labels
Area-VT
Virtual Terminal sequence support
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-1
A description (P1)
Product-Conpty
For console issues specifically related to conpty
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
Severity-Blocking
We won't ship a release like this! No-siree.
Milestone
Environment
Windows build number: Version 10.0.18362.418
Windows Terminal version (if applicable): commit d711d73
Steps to reproduce
printf "\e[?999h 12345 Hello World"
Expected behavior
999 isn't a supported mode, so that should be ignored and passed through to the conpty client. Then the text
12345 Hello World
should be output.Actual behavior
The unrecognized mode sequence gets truncated, losing the final character. and then the start of the text that is output is also truncated, leaving just
ello World
.What's happening is that the missing character leaves the state machine in a state where it's waiting for a final character, so it ends up eating the characters that follow, until it gets to the
H
inHello World
.I believe this is a regression caused by PR #3956. I think it's the calculation of the
_run
variable that is off by 1, but it may be more complicated than that:terminal/src/terminal/parser/stateMachine.cpp
Line 1252 in d711d73
Also note that
_run
is initialized in more than one place.The text was updated successfully, but these errors were encountered: