From b33e06ac4e3e6b040492c02fa9e4f364a0cab972 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 26 Jul 2024 09:51:29 -0700 Subject: [PATCH] Attempting to tweak glyph calculation --- src/widgets/input.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/widgets/input.rs b/src/widgets/input.rs index 18dd42f..cf84e74 100644 --- a/src/widgets/input.rs +++ b/src/widgets/input.rs @@ -881,9 +881,6 @@ where }; } - // Make relative be relative to the center of the glyph for a nearest search. - let relative = relative + rect.size / 2; - let line_height = cache.measured.line_height.get(); if relative.y < 0 || relative.y >= line_height { continue; @@ -897,7 +894,7 @@ where ) .saturating_abs(); let cursor = Cursor { - offset: if relative.x <= rect.size.width / 3 { + offset: if dbg!(relative.x) <= rect.size.width / 3 { glyph.info.start } else { glyph.info.end