mirror of
https://github.com/UberGames/ioef.git
synced 2024-12-01 00:21:19 +00:00
* Reimplement console history recall "bug" behaviour without the bug
This commit is contained in:
parent
91b2b9297a
commit
2e19bdfb5d
1 changed files with 6 additions and 2 deletions
|
@ -548,9 +548,13 @@ void Console_Key (int key) {
|
||||||
|
|
||||||
if ( (key == K_MWHEELDOWN && keys[K_SHIFT].down) || ( key == K_DOWNARROW ) || ( key == K_KP_DOWNARROW ) ||
|
if ( (key == K_MWHEELDOWN && keys[K_SHIFT].down) || ( key == K_DOWNARROW ) || ( key == K_KP_DOWNARROW ) ||
|
||||||
( ( tolower(key) == 'n' ) && keys[K_CTRL].down ) ) {
|
( ( tolower(key) == 'n' ) && keys[K_CTRL].down ) ) {
|
||||||
if (historyLine + 1 == nextHistoryLine)
|
|
||||||
return;
|
|
||||||
historyLine++;
|
historyLine++;
|
||||||
|
if (historyLine >= nextHistoryLine) {
|
||||||
|
historyLine = nextHistoryLine;
|
||||||
|
Field_Clear( &g_consoleField );
|
||||||
|
g_consoleField.widthInChars = g_console_field_width;
|
||||||
|
return;
|
||||||
|
}
|
||||||
g_consoleField = historyEditLines[ historyLine % COMMAND_HISTORY ];
|
g_consoleField = historyEditLines[ historyLine % COMMAND_HISTORY ];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue