diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index 0822002689..4d8099a4d8 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -308,7 +308,7 @@ void TextEditor::doubleclick_event(MouseEvent& event) auto selection = selected_text(); if (!selection.is_whitespace()) - highlight_all_occurances_of(selected_text()); + highlight_all_occurances_of(selection); set_cursor(m_selection.end()); update(); diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h index c057aadc43..8d680e92ff 100644 --- a/Userland/Libraries/LibGUI/TextEditor.h +++ b/Userland/Libraries/LibGUI/TextEditor.h @@ -390,7 +390,7 @@ private: void on_search_results(GUI::TextRange current, Vector all_results); static constexpr auto search_results_span_collection_index = 1; - static constexpr auto highlight_selected_text_span_collection_index = 1; + static constexpr auto highlight_selected_text_span_collection_index = 2; Type m_type { MultiLine }; Mode m_mode { Editable };