diff options
Diffstat (limited to 'alacritty/src/display.rs')
-rw-r--r-- | alacritty/src/display.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/alacritty/src/display.rs b/alacritty/src/display.rs index c456fda8..eafab8c2 100644 --- a/alacritty/src/display.rs +++ b/alacritty/src/display.rs @@ -286,7 +286,15 @@ impl Display { size_info.cell_height = cell_height; } - /// Process update events + /// Clear glyph cache. + fn clear_glyph_cache(&mut self) { + let cache = &mut self.glyph_cache; + self.renderer.with_loader(|mut api| { + cache.clear_glyph_cache(&mut api); + }); + } + + /// Process update events. pub fn handle_update<T>( &mut self, terminal: &mut Term<T>, @@ -298,6 +306,8 @@ impl Display { // Update font size and cell dimensions if let Some(font) = update_pending.font { self.update_glyph_cache(config, font); + } else if update_pending.cursor { + self.clear_glyph_cache(); } let cell_width = self.size_info.cell_width; |