From 09b95eeae2a9b5a41283632f73b82a392253384c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 18 Jun 2025 20:22:10 +0200 Subject: [PATCH] Fixed automatic moving of the cursor when inputting characters with number keys --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ menuitems.c | 6 +++--- osdbase.c | 5 ++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index fb913a34..c8a1bcd3 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3389,6 +3389,8 @@ Stefan Hofmann for adding '~' to the list of delimiters in cTextWrapper for suggesting to delete old recording info before reading modified info file for fixing strreplace() in case the search string is empty + for reporting broken automatic moving of the cursor when inputting characters with + number keys Stefan Blochberger for suggesting to automatically display the progress display whenever replay of a diff --git a/HISTORY b/HISTORY index cd4022c4..6afefec8 100644 --- a/HISTORY +++ b/HISTORY @@ -10130,3 +10130,5 @@ Video Disk Recorder Revision History - Enabled manually turning subtitles on/off in 'after rewind' mode. - Limiting timeouts to a minimum of 3ms to avoid problems with polls and waits if timeout is 0. - Fixed strreplace() in case the search string is empty (thanks to Stefan Hofmann). +- Fixed automatic moving of the cursor when inputting characters with number keys (reported + by Stefan Hofmann). diff --git a/menuitems.c b/menuitems.c index 32809e9e..b246339b 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 5.3 2025/01/29 10:20:17 kls Exp $ + * $Id: menuitems.c 5.4 2025/06/18 20:22:10 kls Exp $ */ #include "menuitems.h" @@ -100,7 +100,7 @@ eOSState cMenuEditIntItem::ProcessKey(eKeys Key) bool IsRepeat = Key & k_Repeat; Key = NORMALKEY(Key); switch (Key) { - case kNone: break; + case kNone: return state; case k0 ... k9: if (fresh) { newValue = 0; @@ -300,7 +300,7 @@ eOSState cMenuEditPrcItem::ProcessKey(eKeys Key) double newValue = round(*value * factor); // avoids precision problems Key = NORMALKEY(Key); switch (Key) { - case kNone: break; + case kNone: return state; case k0 ... k9: if (fresh) { newValue = 0; diff --git a/osdbase.c b/osdbase.c index e7a9755e..2a72092f 100644 --- a/osdbase.c +++ b/osdbase.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.c 5.9 2025/02/17 10:49:10 kls Exp $ + * $Id: osdbase.c 5.10 2025/06/18 20:22:10 kls Exp $ */ #include "osdbase.h" @@ -579,8 +579,7 @@ eOSState cOsdMenu::ProcessKey(eKeys Key) if (marked < 0 && item) { eOSState state = item->ProcessKey(Key); if (state != osUnknown) { - if (Key != kNone) - DisplayCurrent(true); + DisplayCurrent(true); return state; } }