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)
This commit is contained in:
xda 2025-01-03 14:46:51 +08:00 committed by GitHub
parent 0cc6b90cde
commit 8b89b5ba7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
};