From a5bb567c0a15bed65ff18c94d04c8c147bf817a9 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 15 Oct 2024 11:41:08 +0300 Subject: Implement multi-char cursor highlight Use `end` of the cursor to draw a `HollowBlock` from `start` to `end`. When cursor covers only a single character, use `Beam` cursor instead of `HollowBlock`. Fixes #8238. Fixes #7849. --- alacritty/src/display/cursor.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'alacritty/src/display/cursor.rs') diff --git a/alacritty/src/display/cursor.rs b/alacritty/src/display/cursor.rs index 65933ccc..b0e2d6c3 100644 --- a/alacritty/src/display/cursor.rs +++ b/alacritty/src/display/cursor.rs @@ -24,9 +24,7 @@ impl IntoRects for RenderableCursor { let thickness = (thickness * width).round().max(1.); - if self.is_wide() { - width *= 2.; - } + width *= self.width().get() as f32; match self.shape() { CursorShape::Beam => beam(x, y, height, thickness, self.color()), -- cgit