mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-04 01:41:40 +00:00
Improve console behavior
* Pressing up and down again in the console will result in an empty line, not the stay at the last line from history * Pressing up will really show the last command, not the last-but-one
This commit is contained in:
parent
731428164f
commit
ab86006668
2 changed files with 9 additions and 1 deletions
|
@ -642,6 +642,11 @@ void idConsoleLocal::KeyDownEvent( int key )
|
||||||
{
|
{
|
||||||
consoleField.SetBuffer( hist );
|
consoleField.SetBuffer( hist );
|
||||||
}
|
}
|
||||||
|
else // DG: if no more lines are in the history, show a blank line again
|
||||||
|
{
|
||||||
|
consoleField.Clear();
|
||||||
|
} // DG end
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1413,4 +1418,4 @@ void idConsoleLocal::DrawDebugGraphs()
|
||||||
{
|
{
|
||||||
debugGraphs[i]->Render( renderSystem );
|
debugGraphs[i]->Render( renderSystem );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,6 +131,9 @@ idStr idConsoleHistory::RetrieveFromHistory( bool backward )
|
||||||
{
|
{
|
||||||
if( downPoint >= numHistory )
|
if( downPoint >= numHistory )
|
||||||
{
|
{
|
||||||
|
// DG: without this you'll get the last-but-one command when pressing UP
|
||||||
|
upPoint = downPoint - 1;
|
||||||
|
// DG end
|
||||||
return idStr( "" );
|
return idStr( "" );
|
||||||
}
|
}
|
||||||
returnLine = downPoint;
|
returnLine = downPoint;
|
||||||
|
|
Loading…
Reference in a new issue