-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the HPR and VPR escape sequences #4297
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, so straightforward. Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
HPR
andVPR
escape sequences from the VT510 terminal.HPR
moves the cursor position forward by a given number of columns, andVPR
moves the cursor position downward by a given number of rows. They're similar in function to theCUF
andCUD
escape sequences, except that they're not constrained by the scrolling margins.References
#3628 provided the new
_CursorMovePosition
method that made these operations possiblePR Checklist
Detailed Description of the Pull Request / Additional comments
Most of the implementation is in the new
_CursorMovePosition
method 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
HPR
andVPR
sequences 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
HPR
andVPR
tests in Vttest (under Test non-VT100 / ISO-6429 cursor-movement) and confirmed that they are now working as expected.