From bd2524f06086d97e916c4cd03e3174d4e37adeee Mon Sep 17 00:00:00 2001 From: "Anton E. Gavrilov" Date: Wed, 8 Mar 2000 21:35:17 +0000 Subject: [PATCH] A fix to Con_DrawInput for new console editing style. --- common/console.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/common/console.c b/common/console.c index 94708b6..f24c79c 100644 --- a/common/console.c +++ b/common/console.c @@ -444,19 +444,21 @@ void Con_DrawInput (void) int y; int i; char *text; + char temp[MAXCMDLINE]; if (key_dest != key_console && cls.state == ca_active) return; // don't draw anything (allways draw if not active) - text = key_lines[edit_line]; - -// add the cursor frame - text[key_linepos] = 10+((int)(realtime*con_cursorspeed)&1); - + text = strcpy (temp, key_lines[edit_line]); + // fill out remainder with spaces - for (i=key_linepos+1 ; i< con_linewidth ; i++) + for (i=strlen(text) ; i < MAXCMDLINE ; i++) text[i] = ' '; - + +// add the cursor frame + if ( (int)(realtime*con_cursorspeed) & 1 ) + text[key_linepos] = 11; + // prestep if horizontally scrolling if (key_linepos >= con_linewidth) text += 1 + key_linepos - con_linewidth; @@ -466,9 +468,6 @@ void Con_DrawInput (void) for (i=0 ; i