1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed deleting characters in string entry fields in 'insert' mode

This commit is contained in:
Klaus Schmidinger 2002-12-15 11:05:19 +01:00
parent b90e708733
commit d610d95e50
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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,6 +262,7 @@ 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) {
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)))