diff options
Diffstat (limited to 'menuitems.c')
-rw-r--r-- | menuitems.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/menuitems.c b/menuitems.c index 7bd1605a..34e0dd75 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.33 2006/02/28 12:53:37 kls Exp $ + * $Id: menuitems.c 1.34 2006/03/26 09:10:17 kls Exp $ */ #include "menuitems.h" @@ -290,12 +290,11 @@ void cMenuEditStrItem::AdvancePos(void) void cMenuEditStrItem::Set(void) { char buf[1000]; - const char *fmt = insert && newchar ? "[]%c%s" : "[%c]%s"; if (InEditMode()) { const cFont *font = cFont::GetFont(fontOsd); strncpy(buf, value, pos); - snprintf(buf + pos, sizeof(buf) - pos - 2, fmt, *(value + pos), value + pos + 1); + snprintf(buf + pos, sizeof(buf) - pos - 2, insert && newchar ? "[]%c%s" : "[%c]%s", *(value + pos), value + pos + 1); int width = cSkinDisplay::Current()->EditableWidth(); if (font->Width(buf) <= width) { // the whole buffer fits on the screen |