Add support for the HPA escape sequence #3368
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
HPA
(horizontal position absolute) is just an alias for the existingCHA
(cursor horizontal absolute) escape sequence, which moves the cursor position to the specified column on the current line. This is needed in order to pass theHPA
test in Vttest.PR Checklist
Detailed Description of the Pull Request / Additional comments
As discussed in issue #3348, the general consensus is that this can be considered an alias for the
CHA
escape sequence. So I've just added a new entry in theVTActionCodes
enum for theHPA
final character, and then updated the switch statements inOutputStateMachineEngine::ActionCsiDispatch
to share the same code path as the existingCHA
action.I haven't bothered with giving it a unique telemetry code, since we haven't done that for the
CUP
andHVP
codes either, so I assumed that would be OK.Validation Steps Performed
I've extended the existing output engine tests for CSI cursor movement to confirm that
HPA
is dispatched in the same way asCHA
. I've also checked theHPA
test in Vttest (under Test non-VT100 / ISO-6429 cursor-movement) and confirmed that it is now working as expected.