We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 482a31f commit 0cc6b90Copy full SHA for 0cc6b90
crates/ui/src/input/input.rs
@@ -326,6 +326,13 @@ impl TextInput {
326
327
new_sub_line += direction;
328
329
+ // Handle moving above the first line
330
+ if direction == -1 && new_line_index == 0 && new_sub_line < 0 {
331
+ // Move cursor to the beginning of the text
332
+ self.move_to(0, cx);
333
+ return;
334
+ }
335
+
336
if new_sub_line < 0 {
337
if new_line_index > 0 {
338
new_line_index -= 1;
@@ -345,6 +352,7 @@ impl TextInput {
345
352
}
346
353
347
354
355
+ // If after adjustment, still at the same position, do not proceed
348
356
if new_line_index == current_line_index && new_sub_line == current_sub_line as i32 {
349
357
return;
350
358
0 commit comments