Merge pull request #7674 from furo321/history-login-prompt

Disable cycling through command history when logging in to rcon.
This commit is contained in:
Robert Müller 2023-12-17 15:55:04 +00:00 committed by GitHub
commit 4ddf1dfdd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,7 +313,11 @@ bool CGameConsole::CInstance::OnInput(const IInput::CEvent &Event)
}
else if(Event.m_Key == KEY_UP)
{
if(!m_Searching)
if(m_Searching)
{
SelectNextSearchMatch(-1);
}
else if(m_Type == CONSOLETYPE_LOCAL || m_pGameConsole->Client()->RconAuthed())
{
if(m_pHistoryEntry)
{
@ -328,15 +332,15 @@ bool CGameConsole::CInstance::OnInput(const IInput::CEvent &Event)
if(m_pHistoryEntry)
m_Input.Set(m_pHistoryEntry);
}
else
{
SelectNextSearchMatch(-1);
}
Handled = true;
}
else if(Event.m_Key == KEY_DOWN)
{
if(!m_Searching)
if(m_Searching)
{
SelectNextSearchMatch(1);
}
else if(m_Type == CONSOLETYPE_LOCAL || m_pGameConsole->Client()->RconAuthed())
{
if(m_pHistoryEntry)
m_pHistoryEntry = m_History.Next(m_pHistoryEntry);
@ -346,10 +350,6 @@ bool CGameConsole::CInstance::OnInput(const IInput::CEvent &Event)
else
m_Input.Clear();
}
else
{
SelectNextSearchMatch(1);
}
Handled = true;
}
else if(Event.m_Key == KEY_TAB)