mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
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.
This commit is contained in:
parent
f3d672d53d
commit
21ba9c808e
Notes:
sideshowbarker
2024-07-17 18:01:10 +09:00
Author: https://github.com/thankyouverycool
Commit: 21ba9c808e
Pull-request: https://github.com/SerenityOS/serenity/pull/12811
Issue: https://github.com/SerenityOS/serenity/issues/12300
3 changed files with 17 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue