From 8b89b5ba7cf7f17a2b8ec19fdc1b4c4e4e01c98a Mon Sep 17 00:00:00 2001 From: xda <150917089+xda2023@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:46:51 +0800 Subject: [PATCH] input: Fix TextInput cursor getting stuck on Down key press (#526) ## Before ![2025-01-03 13 55 08 before](https://github.com/user-attachments/assets/3714e316-289b-4426-b18a-23ac718c05e6) ## After ![2025-01-03 13 54 22 after](https://github.com/user-attachments/assets/5d82a864-6cda-4191-adee-26634ef93506) --- crates/ui/src/input/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/input/input.rs b/crates/ui/src/input/input.rs index c9a61655..fe239f0c 100644 --- a/crates/ui/src/input/input.rs +++ b/crates/ui/src/input/input.rs @@ -365,7 +365,7 @@ impl TextInput { let index_res = target_line.index_for_position(approx_pos, line_height); let new_local_index = match index_res { - Ok(i) => i, + Ok(i) => i + 1, Err(i) => i, };