aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display/cursor.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2024-10-15 11:41:08 +0300
committerGitHub <noreply@github.com>2024-10-15 11:41:08 +0300
commita5bb567c0a15bed65ff18c94d04c8c147bf817a9 (patch)
treeda9efc2394af9c52ade67832ab172a5ab3fa8400 /alacritty/src/display/cursor.rs
parenta2653293a8e6ac5f5fb9f7e075656799d8df3488 (diff)
downloadr-alacritty-a5bb567c0a15bed65ff18c94d04c8c147bf817a9.tar.gz
r-alacritty-a5bb567c0a15bed65ff18c94d04c8c147bf817a9.tar.bz2
r-alacritty-a5bb567c0a15bed65ff18c94d04c8c147bf817a9.zip
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.
Diffstat (limited to 'alacritty/src/display/cursor.rs')
-rw-r--r--alacritty/src/display/cursor.rs4
1 files changed, 1 insertions, 3 deletions
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()),