diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-27 18:41:54 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-27 19:52:18 +0200 |
commit | 30edd198eceee089d53ab40a7d97f607924b5640 (patch) | |
tree | bc3edce58919bb6e8489e982d8c97ac85c8aeef0 | |
parent | 99e775cee353f7b74007ed8b1fcb8203750aeebb (diff) | |
download | serenity-30edd198eceee089d53ab40a7d97f607924b5640.zip |
LibGUI: Make TextEditor::select_all() move the cursor to document head
This feels a lot nicer than moving the cursor to the document end.
-rw-r--r-- | Libraries/LibGUI/TextEditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp index f857474eee..85f166d35b 100644 --- a/Libraries/LibGUI/TextEditor.cpp +++ b/Libraries/LibGUI/TextEditor.cpp @@ -535,9 +535,9 @@ void TextEditor::select_all() { TextPosition start_of_document { 0, 0 }; TextPosition end_of_document { line_count() - 1, line(line_count() - 1).length() }; - m_selection.set(start_of_document, end_of_document); + m_selection.set(end_of_document, start_of_document); did_update_selection(); - set_cursor(end_of_document); + set_cursor(start_of_document); update(); } |