diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-08 14:12:41 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-08 14:12:41 +0100 |
commit | 5602f3be6cc2d02e84b18ebe95c251706573ab76 (patch) | |
tree | e557e1e2e2504f7646ead38d8c6930ca35dc0f07 | |
parent | 220c7b5f75c48f4e0dee432221e8047826d0667c (diff) | |
download | serenity-5602f3be6cc2d02e84b18ebe95c251706573ab76.zip |
GTextEditor: Ctrl+A should select the entire document.
-rw-r--r-- | LibGUI/GTextEditor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/LibGUI/GTextEditor.cpp b/LibGUI/GTextEditor.cpp index 9feb0315c9..1be0da742a 100644 --- a/LibGUI/GTextEditor.cpp +++ b/LibGUI/GTextEditor.cpp @@ -294,6 +294,12 @@ void GTextEditor::keydown_event(GKeyEvent& event) set_cursor(line_count() - 1, m_lines[line_count() - 1]->length()); return; } + if (event.modifiers() == Mod_Ctrl && event.key() == KeyCode::Key_A) { + m_selection_start = { 0, 0 }; + set_cursor(line_count() - 1, m_lines[line_count() - 1]->length()); + update(); + return; + } if (!event.modifiers() && event.key() == KeyCode::Key_Backspace) { if (has_selection()) { |