瀏覽代碼

LibGUI: Make TextEditor::select_all() move the cursor to document head

This feels a lot nicer than moving the cursor to the document end.
Andreas Kling 5 年之前
父節點
當前提交
30edd198ec
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Libraries/LibGUI/TextEditor.cpp

+ 2 - 2
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();
 }