1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

GTextEditor: Backspace and Delete should work regardless of modifier state.

This commit is contained in:
Andreas Kling 2019-03-08 18:50:14 +01:00
parent 032549d7bf
commit ccda716028

View file

@ -360,7 +360,7 @@ void GTextEditor::keydown_event(GKeyEvent& event)
return; return;
} }
if (!event.modifiers() && event.key() == KeyCode::Key_Backspace) { if (event.key() == KeyCode::Key_Backspace) {
if (has_selection()) { if (has_selection()) {
delete_selection(); delete_selection();
return; return;
@ -386,7 +386,7 @@ void GTextEditor::keydown_event(GKeyEvent& event)
return; return;
} }
if (!event.modifiers() && event.key() == KeyCode::Key_Delete) { if (event.key() == KeyCode::Key_Delete) {
if (has_selection()) { if (has_selection()) {
delete_selection(); delete_selection();
return; return;