From 33abfe34a86863958e70a6b5109eab5740a6bc81 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 15 Apr 2020 06:50:34 +0300 Subject: Add config option to set cursor thickness Fixes #3526. --- alacritty/src/display.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'alacritty/src/display.rs') 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( &mut self, terminal: &mut Term, @@ -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; -- cgit