Only add command to history if it differs from previous one

This commit is contained in:
indev committed 2023-10-24 20:57:42 +03:00
1 parent 773e243c88
commit 601928f49f
1 file changed
+4 -1
+4 -1
View File
@@ -1142,7 +1142,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();