From 8bb6a820e2a10061a035b92a1e5fefee2db91851 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Wed, 26 Apr 2023 17:23:18 +0100 Subject: [PATCH] Help: Sort search results by score This makes pages with matching titles appear at the top of the search results. --- Userland/Applications/Help/MainWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/Help/MainWidget.cpp b/Userland/Applications/Help/MainWidget.cpp index 0fdcbf0aca..a1a9ab271c 100644 --- a/Userland/Applications/Help/MainWidget.cpp +++ b/Userland/Applications/Help/MainWidget.cpp @@ -230,7 +230,7 @@ ErrorOr MainWidget::initialize_fallibles(GUI::Window& window) m_manual_model = TRY(ManualModel::create()); m_browse_view->set_model(*m_manual_model); - m_filter_model = TRY(GUI::FilteringProxyModel::create(*m_manual_model)); + m_filter_model = TRY(GUI::FilteringProxyModel::create(*m_manual_model, GUI::FilteringProxyModel::FilteringOptions::SortByScore)); m_search_view->set_model(*m_filter_model); m_filter_model->set_filter_term(""sv);