mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-10 05:59:08 -07:00
Fix keyboard cursor underflow with ascii events --nobuild
This commit is contained in:
@@ -606,8 +606,10 @@ static bool text_input_view_ascii_callback(AsciiEvent* event, void* context) {
|
||||
model->cursor_pos =
|
||||
CLAMP(model->cursor_pos + 1, strlen(model->text_buffer), 0u);
|
||||
} else {
|
||||
model->cursor_pos =
|
||||
CLAMP(model->cursor_pos - 1, strlen(model->text_buffer), 0u);
|
||||
if(model->cursor_pos > 0) {
|
||||
model->cursor_pos =
|
||||
CLAMP(model->cursor_pos - 1, strlen(model->text_buffer), 0u);
|
||||
}
|
||||
}
|
||||
},
|
||||
true);
|
||||
|
||||
Reference in New Issue
Block a user