mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7536 from jtbx/scrollback-history
Show previous commands in the console's scrollback buffer
This commit is contained in:
commit
cb22fbf902
|
@ -254,6 +254,10 @@ 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);
|
||||
}
|
||||
}
|
||||
ExecuteLine(m_Input.GetString());
|
||||
|
|
Loading…
Reference in a new issue