diff options
author | Mats Lidell <matsl@rockbox.org> | 2003-03-11 15:05:04 +0000 |
---|---|---|
committer | Mats Lidell <matsl@rockbox.org> | 2003-03-11 15:05:04 +0000 |
commit | cad6f24a50284d08aa2e4d6f5f5cc438396c6ef7 (patch) | |
tree | c633a4c3ff89ed639db2693a42cae285bb0b47ac /apps/player | |
parent | 42f261eebef6ddbec6f9d8d1c4a1999cc72f588b (diff) | |
download | rockbox-cad6f24a50284d08aa2e4d6f5f5cc438396c6ef7.tar.gz rockbox-cad6f24a50284d08aa2e4d6f5f5cc438396c6ef7.zip |
Synched with recorder: Starts editing at the end of the string.
Bug with long strings fixed (Strings longer than newchars was
truncated.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3431 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/player')
-rw-r--r-- | apps/player/keyboard.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/player/keyboard.c b/apps/player/keyboard.c index aee6eb5de9..70084f8612 100644 --- a/apps/player/keyboard.c +++ b/apps/player/keyboard.c @@ -97,6 +97,10 @@ int kbd_input(char* text, int buflen) lcd_clear_display(); + old_cursor_pos=cursor_pos=strlen(text); + if (9<cursor_pos) + left_pos=cursor_pos-9; + while (!done) { int i, p; int len = strlen(text); @@ -109,8 +113,8 @@ int kbd_input(char* text, int buflen) left_pos--; p=0; i = left_pos; - while (p<10 && line[i]) { - temptext[p++]=text[i++]; + while (p<10 && text[i]) { + temptext[p++]=text[i++]; } temptext[p]=0; lcd_remove_cursor(); @@ -128,7 +132,7 @@ int kbd_input(char* text, int buflen) for (i=1; i < 8; i++) { temptext[i+2]=line[(i+x)%linelen]; } - temptext[p]=0; + temptext[i+2]=0; lcd_puts(1, 1, temptext); break; case MENU_LINE_BACKSPACE: |