From 774eb03f4ff01f692f645d930da54990bf92d19c Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Fri, 11 Feb 2022 02:04:50 +0300 Subject: 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. --- alacritty/src/display/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alacritty/src') diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs index 7a694278..ef4cfc10 100644 --- a/alacritty/src/display/mod.rs +++ b/alacritty/src/display/mod.rs @@ -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. -- cgit