summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/menuitems.c b/menuitems.c
index cbfcf053..086668ee 100644
--- a/menuitems.c
+++ b/menuitems.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menuitems.c 1.46 2006/07/23 09:42:17 kls Exp $
+ * $Id: menuitems.c 1.47 2006/07/30 09:09:30 kls Exp $
*/
#include "menuitems.h"
@@ -313,7 +313,7 @@ void cMenuEditStrItem::Set(void)
SetValue(buf);
return;
}
- width -= font->Width('>'); // assuming '<' and '>' have the same with
+ width -= font->Width('>'); // assuming '<' and '>' have the same width
int w = 0;
int i = 0;
int l = strlen(buf);
@@ -395,6 +395,8 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
if (strlen(value) > 1) {
if (!insert || pos < int(strlen(value)) - 1)
memmove(value + pos, value + pos + 1, strlen(value) - pos);
+ else if (insert && pos == int(strlen(value)) - 1)
+ value[pos] = ' '; // in insert mode, deleting the last character replaces it with a blank to keep the cursor position
// reduce position, if we removed the last character
if (pos == int(strlen(value)))
pos--;