From 974392cdc6fdf1ba0d213145ae578a9316e9d404 Mon Sep 17 00:00:00 2001 From: Stokhos Date: Sun, 28 Mar 2021 14:02:12 -0400 Subject: Fix cursor thickness on wide cells Fixes #4922. --- alacritty/src/display/cursor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alacritty/src') diff --git a/alacritty/src/display/cursor.rs b/alacritty/src/display/cursor.rs index 0750459d..7cd631e3 100644 --- a/alacritty/src/display/cursor.rs +++ b/alacritty/src/display/cursor.rs @@ -22,12 +22,12 @@ impl IntoRects for RenderableCursor { let mut width = size_info.cell_width(); let height = size_info.cell_height(); + let thickness = (thickness * width as f32).round().max(1.); + if self.is_wide() { width *= 2.; } - let thickness = (thickness * width as f32).round().max(1.); - match self.shape() { CursorShape::Beam => beam(x, y, height, thickness, self.color()), CursorShape::Underline => underline(x, y, width, height, thickness, self.color()), -- cgit