Fix CConsole history navigation bug

Fix bug where a space character gets appended on each navigation event, even if there already is a space character.
This commit is contained in:
Kawe Mazidjatari 2022-06-20 11:21:18 +02:00
parent 43b73dc717
commit 44157bdce4

View File

@ -715,7 +715,7 @@ int CConsole::TextEditCallback(ImGuiInputTextCallbackData* iData)
if (!svHistory.empty())
{
if (m_vsvHistory[m_nHistoryPos].find(" ") != string::npos)
if (m_vsvHistory[m_nHistoryPos].find(" ") == string::npos)
{
// Append whitespace to previous entered command if absent or no parameters where passed.
svHistory.append(" ");