summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Müller <robytemueller@gmail.com>2023-05-26 23:28:31 +0200
committerRobert Müller <robytemueller@gmail.com>2023-06-26 23:06:03 +0200
commit582c0d23dbc13b012dde11bfe64d6031c6ac962d (patch)
tree75e4123cff28fd38fce967af1de8022423923389
parent8a18e656c9348995540d9b937d98ea3493098094 (diff)
Delete selection with backspace/delete regardless of word mode
Also delete the lineinput selection when pressing backspace/delete and the key for skipping words (Ctrl/GUI key, Alt on macOS) is held. This is consistent with the behavior in other applications.
-rw-r--r--src/game/client/lineinput.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/client/lineinput.cpp b/src/game/client/lineinput.cpp
index ff6752f36..e9264b02c 100644
--- a/src/game/client/lineinput.cpp
+++ b/src/game/client/lineinput.cpp
@@ -221,7 +221,7 @@ bool CLineInput::ProcessInput(const IInput::CEvent &Event)
if(Event.m_Key == KEY_BACKSPACE)
{
- if(SelectionLength && !MoveWord)
+ if(SelectionLength)
{
SetRange("", m_SelectionStart, m_SelectionEnd);
}
@@ -241,7 +241,7 @@ bool CLineInput::ProcessInput(const IInput::CEvent &Event)
}
else if(Event.m_Key == KEY_DELETE)
{
- if(SelectionLength && !MoveWord)
+ if(SelectionLength)
{
SetRange("", m_SelectionStart, m_SelectionEnd);
}