diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2020-04-15 06:50:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 03:50:34 +0000 |
commit | 33abfe34a86863958e70a6b5109eab5740a6bc81 (patch) | |
tree | 7a35c4e477f87a97694c6d2562131a59ab128e05 /alacritty/src/display.rs | |
parent | ab2db49af5467ec972e297259dd8c23022783347 (diff) | |
download | r-alacritty-33abfe34a86863958e70a6b5109eab5740a6bc81.tar.gz r-alacritty-33abfe34a86863958e70a6b5109eab5740a6bc81.tar.bz2 r-alacritty-33abfe34a86863958e70a6b5109eab5740a6bc81.zip |
Add config option to set cursor thickness
Fixes #3526.
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; |