From 5602f3be6cc2d02e84b18ebe95c251706573ab76 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 8 Mar 2019 14:12:41 +0100 Subject: GTextEditor: Ctrl+A should select the entire document. --- LibGUI/GTextEditor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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()) { -- cgit v1.2.3