From 83284b15c506fbabdc41b063f0464f15d695a73f Mon Sep 17 00:00:00 2001 From: myT Date: Sat, 30 Apr 2022 18:53:36 +0200 Subject: [PATCH] resetting the search line index when clearing the console --- code/client/cl_console.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/client/cl_console.cpp b/code/client/cl_console.cpp index 01ae362..3785311 100644 --- a/code/client/cl_console.cpp +++ b/code/client/cl_console.cpp @@ -104,7 +104,7 @@ struct console_t { float helpXAdjust; char searchPattern[256]; - qbool searchLineIndex; + int searchLineIndex; qbool searchStarted; qbool markMode; @@ -289,15 +289,14 @@ void Con_MessageMode4_f (void) { static void Con_Clear_f( void ) { - int i; - - for ( i = 0 ; i < CON_TEXTSIZE ; i++ ) { + for ( int i = 0 ; i < CON_TEXTSIZE ; i++ ) { con.text[i] = (COLOR_WHITE << 8) | ' '; } con.current = con.totallines - 1; - Con_Bottom(); + + con.searchLineIndex = INT_MIN; }