LibLine: Don't add empty lines to history

This commit is contained in:
Linus Groh 2020-05-25 23:45:01 +01:00 committed by Andreas Kling
parent 67b742bf32
commit 4e607192c7

View file

@ -63,6 +63,8 @@ Editor::~Editor()
void Editor::add_to_history(const String& line)
{
if (line.is_empty())
return;
if ((m_history.size() + 1) > m_history_capacity)
m_history.take_first();
m_history.append(line);