diff options
Diffstat (limited to 'apps')
-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) | |||
97 | 97 | ||
98 | lcd_clear_display(); | 98 | lcd_clear_display(); |
99 | 99 | ||
100 | old_cursor_pos=cursor_pos=strlen(text); | ||
101 | if (9<cursor_pos) | ||
102 | left_pos=cursor_pos-9; | ||
103 | |||
100 | while (!done) { | 104 | while (!done) { |
101 | int i, p; | 105 | int i, p; |
102 | int len = strlen(text); | 106 | int len = strlen(text); |
@@ -109,8 +113,8 @@ int kbd_input(char* text, int buflen) | |||
109 | left_pos--; | 113 | left_pos--; |
110 | p=0; | 114 | p=0; |
111 | i = left_pos; | 115 | i = left_pos; |
112 | while (p<10 && line[i]) { | 116 | while (p<10 && text[i]) { |
113 | temptext[p++]=text[i++]; | 117 | temptext[p++]=text[i++]; |
114 | } | 118 | } |
115 | temptext[p]=0; | 119 | temptext[p]=0; |
116 | lcd_remove_cursor(); | 120 | lcd_remove_cursor(); |
@@ -128,7 +132,7 @@ int kbd_input(char* text, int buflen) | |||
128 | for (i=1; i < 8; i++) { | 132 | for (i=1; i < 8; i++) { |
129 | temptext[i+2]=line[(i+x)%linelen]; | 133 | temptext[i+2]=line[(i+x)%linelen]; |
130 | } | 134 | } |
131 | temptext[p]=0; | 135 | temptext[i+2]=0; |
132 | lcd_puts(1, 1, temptext); | 136 | lcd_puts(1, 1, temptext); |
133 | break; | 137 | break; |
134 | case MENU_LINE_BACKSPACE: | 138 | case MENU_LINE_BACKSPACE: |