diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-04-19 18:00:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-19 18:00:24 +0000 |
commit | cfc20d4f34dca535654cc32df18e785296af4cc5 (patch) | |
tree | b9697a365d1ec4b3161fd67937497e90a63f5c0d /src/display.rs | |
parent | a47d716daace7c197392854754406a06454ec380 (diff) | |
download | alacritty-cfc20d4f34dca535654cc32df18e785296af4cc5.tar.gz alacritty-cfc20d4f34dca535654cc32df18e785296af4cc5.zip |
Fix cursor dimensions with font offset
Previously cursor dimensions were not calculated correctly when a font
offset was specified, since the font offset was completely ignored.
This has been fixed by moving all the cursor logic from the font into
the Alacritty crate, applying the config's offsets before rasterizing
the cursors.
This has also fixed an issue with some cursors not being rendered as
double-width correctly when over double-width glyphs.
This fixes #2209.
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display.rs b/src/display.rs index 9e902b94..07ffdd0f 100644 --- a/src/display.rs +++ b/src/display.rs @@ -435,10 +435,11 @@ impl Display { let size_info = *terminal.size_info(); let visual_bell_intensity = terminal.visual_bell.intensity(); let background_color = terminal.background_color(); + let metrics = self.glyph_cache.font_metrics(); let window_focused = self.window.is_focused; let grid_cells: Vec<RenderableCell> = - terminal.renderable_cells(config, window_focused).collect(); + terminal.renderable_cells(config, window_focused, metrics).collect(); // Get message from terminal to ignore modifications after lock is dropped let message_buffer = terminal.message_buffer_mut().message(); @@ -479,7 +480,6 @@ impl Display { { let glyph_cache = &mut self.glyph_cache; - let metrics = glyph_cache.font_metrics(); let mut rects = Rects::new(&metrics, &size_info); // Draw grid |