summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-08 08:24:36 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-08 08:24:36 +0000
commit3842dc3a724a643db732e22a4f0e74a373b7bac4 (patch)
tree882aa823ff111dfe6c94ce4b46c5168529b0cb04
parentc34869023a9c972752af30ad658e4d2b2217b5f6 (diff)
downloadrockbox-3842dc3a724a643db732e22a4f0e74a373b7bac4.tar.gz
rockbox-3842dc3a724a643db732e22a4f0e74a373b7bac4.zip
A bit more elegant cursor position handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5851 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/player/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/player/keyboard.c b/apps/player/keyboard.c
index 76f64fbc88..6467ed60f1 100644
--- a/apps/player/keyboard.c
+++ b/apps/player/keyboard.c
@@ -140,7 +140,7 @@ int kbd_input(char* text, int buflen)
140 lcd_puts(1, 0, temptext); 140 lcd_puts(1, 0, temptext);
141 141
142 /* write out the text */ 142 /* write out the text */
143 curpos = MIN(editpos, 9 - MIN(len - editpos, 2)); 143 curpos = MIN(MIN(editpos, 10 - MIN(len - editpos, 3)), 9);
144 leftpos = editpos - curpos; 144 leftpos = editpos - curpos;
145 strncpy(temptext, text + leftpos, 10); 145 strncpy(temptext, text + leftpos, 10);
146 temptext[10] = 0; 146 temptext[10] = 0;