clear console input on down key
@@ -2562,10 +2562,16 @@ static void onHistoryDown(Console* console)
if(console->history)
{
if(console->history->prev)
+ {
console->history = console->history->prev;
-
fillInputBufferFromHistory(console);
}
+ else
+ {
+ memset(console->inputBuffer, 0, sizeof(console->inputBuffer));
+ console->inputPosition = 0;
+ }
+ }
}
static void appendHistory(Console* console, const char* value)
