Skip to content

Commit

Permalink
Also print command in console when identical to previous
Browse files Browse the repository at this point in the history
The command currently being executed was not being printed to the console if it's identical to the previous history entry.
  • Loading branch information
Robyt3 committed Nov 29, 2023
1 parent 1c2903b commit a1eb0dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game/client/components/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ bool CGameConsole::CInstance::OnInput(const IInput::CEvent &Event)
{
char *pEntry = m_History.Allocate(m_Input.GetLength() + 1);
str_copy(pEntry, m_Input.GetString(), m_Input.GetLength() + 1);
// print out the user's commands before they get run
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "> %s", m_Input.GetString());
m_pGameConsole->PrintLine(m_Type, aBuf);
}
// print out the user's commands before they get run
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "> %s", m_Input.GetString());
m_pGameConsole->PrintLine(m_Type, aBuf);
}
ExecuteLine(m_Input.GetString());
m_Input.Clear();
Expand Down

0 comments on commit a1eb0dd

Please sign in to comment.