mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibGUI: Make Ctrl+Shift+Right select text
Ctrl+Shift+Left would add the word before the cursor to the selection, but for some reason Ctrl+Shift+Right didn't add the word after the cursor to the selection.
This commit is contained in:
parent
7237972022
commit
9a4c1c019a
Notes:
sideshowbarker
2024-07-18 05:23:33 +09:00
Author: https://github.com/aJanuary
Commit: 9a4c1c019a
Pull-request: https://github.com/SerenityOS/serenity/pull/9570
1 changed files with 5 additions and 0 deletions
|
@ -78,7 +78,12 @@ bool EditingEngine::on_key(const KeyEvent& event)
|
|||
}
|
||||
}
|
||||
if (event.ctrl()) {
|
||||
m_editor->update_selection(event.shift());
|
||||
move_to_next_span(event);
|
||||
if (event.shift() && m_editor->selection()->start().is_valid()) {
|
||||
m_editor->selection()->set_end(m_editor->cursor());
|
||||
m_editor->did_update_selection();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
m_editor->update_selection(event.shift());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue