Skip to content

Commit

Permalink
Remove redundant check of key for text input events
Browse files Browse the repository at this point in the history
Input events with `IInput::FLAG_TEXT` never have a key, so this additional check for modifier keys is redundant.
  • Loading branch information
Robyt3 committed Oct 25, 2024
1 parent ce8fa3f commit 565e79f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/client/lineinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ bool CLineInput::ProcessInput(const IInput::CEvent &Event)
const size_t SelectionLength = GetSelectionLength();
bool KeyHandled = false;

if((Event.m_Flags & IInput::FLAG_TEXT) && !(KEY_LCTRL <= Event.m_Key && Event.m_Key <= KEY_RGUI))
if(Event.m_Flags & IInput::FLAG_TEXT)
{
SetRange(Event.m_aText, m_SelectionStart, m_SelectionEnd);
KeyHandled = true;
Expand Down

0 comments on commit 565e79f

Please sign in to comment.