From f49a0ea6bf3550ab37a296fef77810d1804545a4 Mon Sep 17 00:00:00 2001 From: mars Date: Thu, 6 Oct 2022 20:02:43 -0600 Subject: [PATCH] Draw beam cursor correctly --- src/graphics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics.rs b/src/graphics.rs index 12e28aa..7027ece 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -391,13 +391,13 @@ impl Graphics { } CursorShape::Beam => { let tl = term_coords * cell_size; - let br = tl + Point(cell_size.0, 2); + let br = tl + Point(2, cell_size.1); self.canvas.draw_rect(cursor_color, tl, br); } CursorShape::Underline => { let mut tl = term_coords * cell_size; let br = tl + cell_size; - tl.0 += cell_size.0 - 2; + tl.1 = br.1 - 2; self.canvas.draw_rect(cursor_color, tl, br); } CursorShape::HollowBlock => {