Skip to content
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
1 change: 1 addition & 0 deletions inputhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ func NewInputHandler(
// CSI handlers — scroll
p.RegisterCsiHandler(FunctionIdentifier{Final: 'S'}, h.scrollUp)
p.RegisterCsiHandler(FunctionIdentifier{Final: 'T'}, h.scrollDown)
p.RegisterCsiHandler(FunctionIdentifier{Final: '^'}, h.scrollDown)
p.RegisterCsiHandler(FunctionIdentifier{Intermediates: " ", Final: '@'}, h.scrollLeft)
p.RegisterCsiHandler(FunctionIdentifier{Intermediates: " ", Final: 'A'}, h.scrollRight)
p.RegisterCsiHandler(FunctionIdentifier{Intermediates: "'", Final: '}'}, h.insertColumns)
Expand Down
10 changes: 10 additions & 0 deletions inputhandler_csi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,16 @@ func TestScrollUpDown(t *testing.T) {
Input: "AAA\x1b[2;1HBBB\x1b[1T",
Expected: Expectation{Row0: "", Row1: "AAA"},
},
{
Name: "SD_scroll_down_caret_alias",
Input: "AAA\x1b[2;1HBBB\x1b[1^",
Expected: Expectation{Row0: "", Row1: "AAA"},
},
{
Name: "SD_scroll_down_caret_2",
Input: "AAA\x1b[2;1HBBB\x1b[2^",
Expected: Expectation{Row0: "", Row1: ""},
},
}
for _, tc := range tests {
t.Run(tc.Name, func(t *testing.T) {
Expand Down
Loading