mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +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
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