Skip to content
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 HPA escape sequence #3368

Merged
merged 2 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/terminal/parser/OutputStateMachineEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ bool OutputStateMachineEngine::ActionCsiDispatch(const wchar_t wch,
case VTActionCodes::CNL_CursorNextLine:
case VTActionCodes::CPL_CursorPrevLine:
case VTActionCodes::CHA_CursorHorizontalAbsolute:
case VTActionCodes::HPA_HorizontalPositionAbsolute:
case VTActionCodes::VPA_VerticalLinePositionAbsolute:
case VTActionCodes::ICH_InsertCharacter:
case VTActionCodes::DCH_DeleteCharacter:
Expand Down Expand Up @@ -399,6 +400,7 @@ bool OutputStateMachineEngine::ActionCsiDispatch(const wchar_t wch,
TermTelemetry::Instance().Log(TermTelemetry::Codes::CPL);
break;
case VTActionCodes::CHA_CursorHorizontalAbsolute:
case VTActionCodes::HPA_HorizontalPositionAbsolute:
fSuccess = _dispatch->CursorHorizontalPositionAbsolute(uiDistance);
TermTelemetry::Instance().Log(TermTelemetry::Codes::CHA);
break;
Expand Down
1 change: 1 addition & 0 deletions src/terminal/parser/OutputStateMachineEngine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ namespace Microsoft::Console::VirtualTerminal
DECSCPP_SetColumnsPerPage = L'|',
IL_InsertLine = L'L',
DL_DeleteLine = L'M', // Yes, this is the same as RI, however, RI is not preceeded by a CSI, and DL is.
HPA_HorizontalPositionAbsolute = L'`',
VPA_VerticalLinePositionAbsolute = L'd',
DECSTBM_SetScrollingRegion = L'r',
RI_ReverseLineFeed = L'M',
Expand Down
4 changes: 4 additions & 0 deletions src/terminal/parser/ut_parser/OutputEngineTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,8 @@ class StateMachineExternalTest final
pDispatch->ClearState();
TestCsiCursorMovement(L'G', uiDistance, true, &pDispatch->_fCursorHorizontalPositionAbsolute, mach, *pDispatch);
pDispatch->ClearState();
TestCsiCursorMovement(L'`', uiDistance, true, &pDispatch->_fCursorHorizontalPositionAbsolute, mach, *pDispatch);
pDispatch->ClearState();
TestCsiCursorMovement(L'd', uiDistance, true, &pDispatch->_fVerticalLinePositionAbsolute, mach, *pDispatch);
pDispatch->ClearState();
TestCsiCursorMovement(L'@', uiDistance, true, &pDispatch->_fInsertCharacter, mach, *pDispatch);
Expand Down Expand Up @@ -1082,6 +1084,8 @@ class StateMachineExternalTest final
pDispatch->ClearState();
TestCsiCursorMovement(L'G', uiDistance, false, &pDispatch->_fCursorHorizontalPositionAbsolute, mach, *pDispatch);
pDispatch->ClearState();
TestCsiCursorMovement(L'`', uiDistance, false, &pDispatch->_fCursorHorizontalPositionAbsolute, mach, *pDispatch);
pDispatch->ClearState();
TestCsiCursorMovement(L'd', uiDistance, false, &pDispatch->_fVerticalLinePositionAbsolute, mach, *pDispatch);
pDispatch->ClearState();
TestCsiCursorMovement(L'@', uiDistance, false, &pDispatch->_fInsertCharacter, mach, *pDispatch);
Expand Down