mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
A new protocol extension to unscroll the screen
See https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/30
This commit is contained in:
@@ -184,6 +184,9 @@ class TestParser(BaseTest):
|
||||
pb('\033[3 @', ('Shift left escape code not implemented',))
|
||||
pb('\033[3 A', ('Shift right escape code not implemented',))
|
||||
pb('\033[3;4 S', ('Select presentation directions escape code not implemented',))
|
||||
pb('\033[1T', ('screen_reverse_scroll', 1))
|
||||
pb('\033[T', ('screen_reverse_scroll', 1))
|
||||
pb('\033[+T', ('screen_reverse_scroll_and_fill_from_scrollback', 1))
|
||||
|
||||
def test_csi_code_rep(self):
|
||||
s = self.create_screen(8)
|
||||
|
||||
@@ -315,6 +315,12 @@ class TestScreen(BaseTest):
|
||||
def assert_lines(*lines):
|
||||
return self.ae(lines, tuple(str(s.line(i)) for i in range(s.lines)))
|
||||
|
||||
# test the reverse scroll function
|
||||
s = prepare_screen(map(str, range(6)))
|
||||
assert_lines('2', '3', '4', '5', '')
|
||||
s.reverse_scroll(2, True)
|
||||
assert_lines('0', '1', '2', '3', '4')
|
||||
|
||||
# Height increased, width unchanged → pull down lines to fill new space at the top
|
||||
s = prepare_screen(map(str, range(6)))
|
||||
assert_lines('2', '3', '4', '5', '')
|
||||
|
||||
Reference in New Issue
Block a user