From b0c4d3fcdeaf3f3f40b489e74d8439548bc11e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Fri, 26 May 2023 23:28:31 +0200 Subject: [PATCH] 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. --- src/game/client/lineinput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/lineinput.cpp b/src/game/client/lineinput.cpp index c4a46b661..089ce909c 100644 --- a/src/game/client/lineinput.cpp +++ b/src/game/client/lineinput.cpp @@ -224,7 +224,7 @@ bool CLineInput::ProcessInput(const IInput::CEvent &Event) if(Event.m_Key == KEY_BACKSPACE) { - if(SelectionLength && !MoveWord) + if(SelectionLength) { SetRange("", m_SelectionStart, m_SelectionEnd); } @@ -244,7 +244,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); }