mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
reset tab completion just in case of manipulation. #1340
This commit is contained in:
parent
c92c633b95
commit
66d9c5f790
|
@ -212,13 +212,14 @@ bool CChat::OnInput(IInput::CEvent Event)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// reset name completion process
|
|
||||||
if(Event.m_Flags&IInput::FLAG_PRESS && Event.m_Key != KEY_TAB)
|
|
||||||
m_CompletionChosen = -1;
|
|
||||||
|
|
||||||
m_OldChatStringLength = m_Input.GetLength();
|
m_OldChatStringLength = m_Input.GetLength();
|
||||||
m_Input.ProcessInput(Event);
|
if(m_Input.ProcessInput(Event))
|
||||||
m_InputUpdate = true;
|
{
|
||||||
|
m_InputUpdate = true;
|
||||||
|
|
||||||
|
// reset name completion process
|
||||||
|
m_CompletionChosen = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(Event.m_Flags&IInput::FLAG_PRESS && Event.m_Key == KEY_UP)
|
if(Event.m_Flags&IInput::FLAG_PRESS && Event.m_Key == KEY_UP)
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,7 +102,7 @@ bool CLineInput::Manipulate(IInput::CEvent e, char *pStr, int StrMaxSize, int St
|
||||||
return Changes;
|
return Changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLineInput::ProcessInput(IInput::CEvent e)
|
bool CLineInput::ProcessInput(IInput::CEvent e)
|
||||||
{
|
{
|
||||||
Manipulate(e, m_Str, MAX_SIZE, MAX_CHARS, &m_Len, &m_CursorPos, &m_NumChars);
|
return Manipulate(e, m_Str, MAX_SIZE, MAX_CHARS, &m_Len, &m_CursorPos, &m_NumChars);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
|
|
||||||
CLineInput();
|
CLineInput();
|
||||||
void Clear();
|
void Clear();
|
||||||
void ProcessInput(IInput::CEvent e);
|
bool ProcessInput(IInput::CEvent e);
|
||||||
void Set(const char *pString);
|
void Set(const char *pString);
|
||||||
const char *GetString() const { return m_Str; }
|
const char *GetString() const { return m_Str; }
|
||||||
int GetLength() const { return m_Len; }
|
int GetLength() const { return m_Len; }
|
||||||
|
|
Loading…
Reference in a new issue