Commits

Devin Jeanpierre committed 4f127b5 Draft

Fixed cursors not disappearing (code due to Marien Zwart)

  • Participants
  • Parent commits 414c4e9

Comments (0)

Files changed (1)

pygame_display.py

                     self._grid_dirty.add((x, y))
                     self._grid[x, y] = attr, char
 
-        if self._cursor_position is not None:
-            self._grid_dirty.add(self._cursor_position)
-
-        if r.cursor is not None:
+     	if r.cursor != self._cursor_position:
+            if self._cursor_position is not None:
+                self._grid_dirty.add(self._cursor_position)
+            if r.cursor is not None:
+                self._grid_dirty.add(r.cursor)
             self._cursor_position = r.cursor
-        
-        if self._cursor_position is not None:
-            self._grid_dirty.add(self._cursor_position)
 
         dirtied = self._refresh(self._grid_dirty)
         self._grid_dirty.clear()