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:
Robert Müller 2023-05-26 23:28:31 +02:00
parent a5332f0b11
commit b0c4d3fcde

View file

@ -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);
}