mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Swap over a position of cursor while reaching the end of filename in keyboard
In sansa clip + with virtual keyboard you can write/rename a stuff and move your cursor in the filename field. But while your cursor reaches the end/start of filename it just blocks the movement of cursor and beeps if you enabled the "Voice Menu" feature. This patch swaps over cursor to the start/end of filename instead of just blocking movement. Change-Id: I37450df062df60ef4c0d747c13e448d0adbde05b Reviewed-on: http://gerrit.rockbox.org/503 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
This commit is contained in:
parent
5f0692b98c
commit
1fa3f5906e
1 changed files with 12 additions and 6 deletions
|
@ -1226,13 +1226,19 @@ static void kbd_move_cursor(struct edit_state *state, int dir)
|
||||||
{
|
{
|
||||||
state->changed = CHANGED_CURSOR;
|
state->changed = CHANGED_CURSOR;
|
||||||
}
|
}
|
||||||
else
|
else if (state->editpos > state->len_utf8)
|
||||||
{
|
{
|
||||||
state->editpos -= dir;
|
state->editpos = 0;
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
if (global_settings.talk_menu)
|
if (global_settings.talk_menu) beep_play(1000, 150, 1500);
|
||||||
beep_play(1000, 150, 1500);
|
#endif
|
||||||
#endif
|
}
|
||||||
|
else if (state->editpos < 0)
|
||||||
|
{
|
||||||
|
state->editpos = state->len_utf8;
|
||||||
|
#if CONFIG_CODEC == SWCODEC
|
||||||
|
if (global_settings.talk_menu) beep_play(1000, 150, 1500);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue