From 30edd198eceee089d53ab40a7d97f607924b5640 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 27 May 2020 18:41:54 +0200 Subject: LibGUI: Make TextEditor::select_all() move the cursor to document head This feels a lot nicer than moving the cursor to the document end. --- Libraries/LibGUI/TextEditor.cpp | 4 ++-- 1 file 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(); } -- cgit v1.2.3