mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-09 13:45:26 +02:00
When erasing in display upto cursor, the line containing the cursor should be marked as not continued.
Also add some tests for the action of ED on continued flags
This commit is contained in:
@@ -176,21 +176,29 @@ class TestScreen(BaseTest):
|
||||
def all_lines(s):
|
||||
return tuple(str(s.line(i)) for i in range(s.lines))
|
||||
|
||||
def continuations(s):
|
||||
return tuple(s.line(i).is_continued() for i in range(s.lines))
|
||||
|
||||
init()
|
||||
s.erase_in_display()
|
||||
s.erase_in_display(0)
|
||||
self.ae(all_lines(s), ('12345', '12', '', '', ''))
|
||||
self.ae(continuations(s), (False, True, False, False, False))
|
||||
|
||||
init()
|
||||
s.erase_in_display(1)
|
||||
self.ae(all_lines(s), ('', ' 45', '12345', '12345', '12345'))
|
||||
self.ae(continuations(s), (False, False, True, True, True))
|
||||
|
||||
init()
|
||||
s.erase_in_display(2)
|
||||
self.ae(all_lines(s), ('', '', '', '', ''))
|
||||
self.assertTrue(s.line(0).cursor_from(1).bold)
|
||||
self.ae(continuations(s), (False, False, False, False, False))
|
||||
|
||||
init()
|
||||
s.erase_in_display(2, True)
|
||||
self.ae(all_lines(s), ('', '', '', '', ''))
|
||||
self.ae(continuations(s), (False, False, False, False, False))
|
||||
self.assertFalse(s.line(0).cursor_from(1).bold)
|
||||
|
||||
def test_cursor_movement(self):
|
||||
|
||||
Reference in New Issue
Block a user