Dont mark cells the cursor leaves as dirty

This commit is contained in:
Kovid Goyal 2016-10-20 05:29:32 +05:30
parent c0c466a492
commit d95383fa43
2 changed files with 0 additions and 7 deletions

View File

@ -56,7 +56,6 @@ class ChangeTracker(QObject):
def cursor_position_changed(self, cursor: Cursor, x: int, y: int) -> None:
self.changed_cursor = cursor
self.changed_cells[y].add((x, x))
self.dirty()
def update_screen(self):

View File

@ -199,19 +199,13 @@ class TestScreen(BaseTest):
t.reset()
s.cursor_up(2)
self.ae((s.cursor.x, s.cursor.y), (4, 2))
self.assertChanges(t, ignore='cursor', cells={4: ((4, 4),)})
s.cursor_up1()
self.ae((s.cursor.x, s.cursor.y), (0, 1))
self.assertChanges(t, ignore='cursor', cells={2: ((4, 4),)})
s.cursor_forward(3)
self.ae((s.cursor.x, s.cursor.y), (3, 1))
self.assertChanges(t, ignore='cursor', cells={1: ((0, 0),)})
s.cursor_back()
self.ae((s.cursor.x, s.cursor.y), (2, 1))
self.assertChanges(t, ignore='cursor', cells={1: ((3, 3),)})
s.cursor_down()
self.ae((s.cursor.x, s.cursor.y), (2, 2))
self.assertChanges(t, ignore='cursor', cells={1: ((2, 2),)})
s.cursor_down1(5)
self.ae((s.cursor.x, s.cursor.y), (0, 4))
self.assertChanges(t, ignore='cursor', cells={2: ((2, 2),)})