reset tab completion just in case of manipulation. #1340

This commit is contained in:
oy 2015-08-30 10:00:13 +02:00
parent c92c633b95
commit 66d9c5f790
3 changed files with 10 additions and 9 deletions

View file

@ -212,13 +212,14 @@ bool CChat::OnInput(IInput::CEvent Event)
}
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_Input.ProcessInput(Event);
m_InputUpdate = true;
if(m_Input.ProcessInput(Event))
{
m_InputUpdate = true;
// reset name completion process
m_CompletionChosen = -1;
}
}
if(Event.m_Flags&IInput::FLAG_PRESS && Event.m_Key == KEY_UP)
{

View file

@ -102,7 +102,7 @@ bool CLineInput::Manipulate(IInput::CEvent e, char *pStr, int StrMaxSize, int St
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);
}

View file

@ -29,7 +29,7 @@ public:
CLineInput();
void Clear();
void ProcessInput(IInput::CEvent e);
bool ProcessInput(IInput::CEvent e);
void Set(const char *pString);
const char *GetString() const { return m_Str; }
int GetLength() const { return m_Len; }