diff options
Diffstat (limited to 'src/client/cl_keys.c')
-rw-r--r-- | src/client/cl_keys.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c index a0d4e065..691a59e2 100644 --- a/src/client/cl_keys.c +++ b/src/client/cl_keys.c @@ -549,9 +549,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 == 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; } |