Clear damage rects right after drawing

Since we could queue damage before we get into the actual rendering
we should clear it after drawing not before.
This commit is contained in:
Kirill Chibisov authored and GitHub committed 2022-02-11 02:04:50 +03:00
1 parent 933030efd4
commit 774eb03f4f
1 file changed
+2 -1
+2 -1
View File
@@ -573,7 +573,6 @@ impl Display {
let vi_mode_cursor = if vi_mode { Some(terminal.vi_mode_cursor) } else { None };
if self.collect_damage() {
self.damage_rects.clear();
self.update_damage(&mut terminal, selection_range, search_state);
}
@@ -740,6 +739,8 @@ impl Display {
api.finish();
});
}
self.damage_rects.clear();
}
/// Update to a new configuration.