Skip to content

Commit

Permalink
* Reimplement console history recall "bug" behaviour without the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Feb 4, 2006
1 parent 91b2b92 commit 2e19bdf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/client/cl_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2e19bdf

Please sign in to comment.