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 2022-02-11 02:04:50 +03:00 committed by GitHub
parent 933030efd4
commit 774eb03f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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.