mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
HackStudio: Fuzzy-match Locator suggestions
This also sorts them to put better results first. Currently the fuzzy-match algorithm gets a little confused, but as that improves, so will this.
This commit is contained in:
parent
85101c6626
commit
4b1c7533f5
Notes:
sideshowbarker
2024-07-17 00:59:43 +09:00
Author: https://github.com/AtkinsSJ
Commit: 4b1c7533f5
Pull-request: https://github.com/SerenityOS/serenity/pull/22938
2 changed files with 18 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
* Copyright (c) 2024, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -78,7 +79,7 @@ Locator::Locator(Core::EventReceiver* parent)
|
|||
open_suggestion(index);
|
||||
};
|
||||
|
||||
m_model = GUI::FilteringProxyModel::create(ProjectDeclarations::the().declarations_model()).release_value_but_fixme_should_propagate_errors();
|
||||
m_model = GUI::FilteringProxyModel::create(ProjectDeclarations::the().declarations_model(), GUI::FilteringProxyModel::FilteringOptions::SortByScore).release_value_but_fixme_should_propagate_errors();
|
||||
m_suggestion_view->set_model(m_model);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue