mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Show previous commands in the console's scrollback buffer
After you issue a command in the client console or rcon, the command will first be printed to the console prefixed with a '>' symbol. Cherry-pick of https://github.com/teeworlds/teeworlds/pull/3185
This commit is contained in:
parent
75628335e3
commit
00f2c8a89f
|
@ -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