summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-12-15 11:05:19 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-12-15 11:05:19 +0100
commitd610d95e509c04fec7be22f4a7ae2fd308fa53a9 (patch)
tree467fc5f33bbaa36a0b9f1e4ca0be9aae956554cf
parentb90e708733789290c633e620f24bd6eb08dd0c2d (diff)
downloadvdr-d610d95e509c04fec7be22f4a7ae2fd308fa53a9.tar.gz
vdr-d610d95e509c04fec7be22f4a7ae2fd308fa53a9.tar.bz2
Fixed deleting characters in string entry fields in 'insert' mode
-rw-r--r--HISTORY1
-rw-r--r--menuitems.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 7e2a7102..cede60cd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1893,3 +1893,4 @@ Video Disk Recorder Revision History
cKbdRemote class into "raw mode", where all keyboard input will be made available
through the new 'kKbd' key code and none of it will be processed as normal remote
control functions (thanks to Jan Rieger for suggestions and testing).
+- Fixed deleting characters in string entry fields in 'insert' mode.
diff --git a/menuitems.c b/menuitems.c
index da65db10..c92d5318 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.10 2002/12/15 10:58:00 kls Exp $
+ * $Id: menuitems.c 1.11 2002/12/15 11:05:19 kls Exp $
*/
#include "menuitems.h"
@@ -262,7 +262,8 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
case kYellow: // Remove the character at current position; in insert mode it is the character to the right of cursor
if (pos >= 0) {
if (strlen(value) > 1) {
- memmove(value + pos, value + pos + 1, strlen(value) - pos);
+ if (!insert || pos < int(strlen(value)) - 1)
+ memmove(value + pos, value + pos + 1, strlen(value) - pos);
// reduce position, if we removed the last character
if (pos == int(strlen(value)))
pos--;