summaryrefslogtreecommitdiff
path: root/Userland/Applications/Help/ManualModel.cpp
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-02-28 11:25:43 -0500
committerAndreas Kling <kling@serenityos.org>2022-03-02 21:37:58 +0100
commit21ba9c808eb23f89282340ab0008c830ce96f5a2 (patch)
tree230b95acf09398777ababec3460fd1ab7f87e49d /Userland/Applications/Help/ManualModel.cpp
parentf3d672d53dbec3d84254d56057594b5d6eff1e1c (diff)
downloadserenity-21ba9c808eb23f89282340ab0008c830ce96f5a2.zip
Help: Improve search ergonomics
Up and down arrows now select search results. Matching index now displays in full before filtering. Searching from the command line focuses the query, and searches are now case insensitive.
Diffstat (limited to 'Userland/Applications/Help/ManualModel.cpp')
-rw-r--r--Userland/Applications/Help/ManualModel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Help/ManualModel.cpp b/Userland/Applications/Help/ManualModel.cpp
index 5c7667de47..f5a99c702c 100644
--- a/Userland/Applications/Help/ManualModel.cpp
+++ b/Userland/Applications/Help/ManualModel.cpp
@@ -174,12 +174,12 @@ void ManualModel::update_section_node_on_toggle(const GUI::ModelIndex& index, co
TriState ManualModel::data_matches(const GUI::ModelIndex& index, const GUI::Variant& term) const
{
auto name = page_name(index);
- if (name.contains(term.as_string()))
+ if (name.contains(term.as_string(), CaseSensitivity::CaseInsensitive))
return TriState::True;
auto view_result = page_view(page_path(index));
if (view_result.is_error() || view_result.value().is_empty())
return TriState::False;
- return view_result.value().contains(term.as_string()) ? TriState::True : TriState::False;
+ return view_result.value().contains(term.as_string(), CaseSensitivity::CaseInsensitive) ? TriState::True : TriState::False;
}