Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix input sequences split across the buffer boundary (#17738)
## Summary of the Pull Request When conhost receives input from a conpty connection, and that input arrives in a block larger than our 4K buffer, we can end up with a VT sequence that's split at the buffer boundary. Previously that could result in the start of the sequence being dropped, and the remaining characters being interpreted as individual key presses. This PR attempts to fix the issue by caching the unprocessed characters from the start of the sequence, and then combining them with the second half of the sequence when it's later received. ## Validation Steps Performed I've confirmed that pasting into vim now works correctly with the sample data from issue #16655. I've also tested with a `DECCTR` report larger than 4K which would previously have been corrupted, and which now works as expected. ## PR Checklist - [x] Closes #16655 (cherry picked from commit 131728b) Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgSCpCk Service-Version: 1.21
- Loading branch information