Add support for the HPR and VPR escape sequences#4297
Conversation
zadjii-msft
left a comment
There was a problem hiding this comment.
Wow, so straightforward. Great work!
DHowett-MSFT
left a comment
There was a problem hiding this comment.
This is great, as always. Thanks!
|
@msftbot merge this in 24 hours |
|
Hello @DHowett-MSFT! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
|
🎉 Handy links: |
|
🎉 Once again, thanks for the contribution! This pull request was included in a set of conhost changes that was just |
Summary of the Pull Request
This PR adds support for the
HPRandVPRescape sequences from the VT510 terminal.HPRmoves the cursor position forward by a given number of columns, andVPRmoves the cursor position downward by a given number of rows. They're similar in function to theCUFandCUDescape sequences, except that they're not constrained by the scrolling margins.References
#3628 provided the new
_CursorMovePositionmethod that made these operations possiblePR Checklist
Detailed Description of the Pull Request / Additional comments
Most of the implementation is in the new
_CursorMovePositionmethod that was created in PR #3628, so all we're really doing here is hooking up the escape sequences to call that method with the appropriate parameters.Validation Steps Performed
I've extended the existing state machine tests for CSI cursor movement to confirm that the
HPRandVPRsequences are dispatched correctly, and also added screen buffer tests to make sure the movement is clamped by the screen boundaries and not the scrolling margins (we don't yet support horizontal margins, but the test is at least in place for when we do eventually add that support).I've also checked the
HPRandVPRtests in Vttest (under Test non-VT100 / ISO-6429 cursor-movement) and confirmed that they are now working as expected.