aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_keys.c
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-02-04 00:28:57 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-02-04 00:28:57 +0000
commitd6d5e0c117c68b79558dcab9f09f7ef10142d836 (patch)
treeecd435727ecab490ddbaf734d946d6f21c34dd55 /code/client/cl_keys.c
parent640f3a035f0ac08203f786935251bb6b71d458e3 (diff)
downloadioquake3-aero-d6d5e0c117c68b79558dcab9f09f7ef10142d836.tar.gz
ioquake3-aero-d6d5e0c117c68b79558dcab9f09f7ef10142d836.zip
* Reimplement console history recall "bug" behaviour without the bug
git-svn-id: svn://svn.icculus.org/quake3/trunk@531 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client/cl_keys.c')
-rw-r--r--code/client/cl_keys.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/code/client/cl_keys.c b/code/client/cl_keys.c
index 796cdf6..16ff35d 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;
}