debugger - don't add history line if it's identical to previous line

This commit is contained in:
Kelvin Sherlock 2015-02-13 20:26:26 -05:00
parent 84ff99c177
commit b1d647d695

View File

@ -1307,8 +1307,10 @@ void Shell()
}
}
// todo -- don't add if same as previous command.
add_history(cp);
// don't add if same as previous entry.
HIST_ENTRY *he = current_history();
if (he == nullptr || strcmp(he->line, cp) != 0)
add_history(cp);
}
free(cp);
}