Only add command to history if it differs from previous one

This commit is contained in:
Indev 2023-10-24 20:57:42 +03:00 committed by NepDisk
parent 5b2bf450c0
commit 5a0303d649

View file

@ -1277,7 +1277,10 @@ boolean CON_Responder(event_t *ev)
CONS_Printf("\x86""%c""\x80""%s\n", CON_PROMPTCHAR, inputlines[inputline]);
inputline = (inputline+1) & 31;
// Only add command to history if it differs from previous one
if (strcmp(inputlines[inputline], inputlines[(inputline-1) & 31]))
inputline = (inputline+1) & 31;
inputhist = inputline;
CON_InputClear();