From 2e19bdfb5d10fabf1ae7ca4c4da36c6a0c2ef41e Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 4 Feb 2006 00:28:57 +0000 Subject: [PATCH] * Reimplement console history recall "bug" behaviour without the bug --- code/client/cl_keys.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/client/cl_keys.c b/code/client/cl_keys.c index 796cdf6e..16ff35d5 100644 --- a/code/client/cl_keys.c +++ b/code/client/cl_keys.c @@ -548,9 +548,13 @@ void Console_Key (int key) { if ( (key == K_MWHEELDOWN && keys[K_SHIFT].down) || ( key == K_DOWNARROW ) || ( key == K_KP_DOWNARROW ) || ( ( tolower(key) == 'n' ) && keys[K_CTRL].down ) ) { - if (historyLine + 1 == nextHistoryLine) - return; historyLine++; + if (historyLine >= nextHistoryLine) { + historyLine = nextHistoryLine; + Field_Clear( &g_consoleField ); + g_consoleField.widthInChars = g_console_field_width; + return; + } g_consoleField = historyEditLines[ historyLine % COMMAND_HISTORY ]; return; }