Shrink history size to 10 soft 20 hard

This commit is contained in:
Lion Kortlepel 2020-11-08 14:21:44 +01:00
parent 0b71d77a48
commit e42256dd5f

View File

@ -152,7 +152,7 @@ static void ProcessCompositeInput() {
CInputBuff += CompositeInput;
}
// ensure history doesnt grow too far beyond a max
static constexpr size_t MaxHistory = 30;
static constexpr size_t MaxHistory = 10;
if (ConsoleHistory.size() > 2 * MaxHistory) {
std::vector<std::string> NewHistory(ConsoleHistory.begin() + ConsoleHistory.size() - MaxHistory, ConsoleHistory.end());
ConsoleHistory = std::move(NewHistory);