mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
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.
This commit is contained in:
parent
a5332f0b11
commit
b0c4d3fcde
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue