mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Sort updated autocomplete results
This commit is contained in:
parent
04888b8f10
commit
ac99191487
3 changed files with 106 additions and 47 deletions
|
@ -8007,8 +8007,12 @@ void BfCompiler::GenerateAutocompleteInfo()
|
|||
{
|
||||
entries.Add(&entry);
|
||||
}
|
||||
|
||||
std::sort(entries.begin(), entries.end(), [](AutoCompleteEntry* lhs, AutoCompleteEntry* rhs)
|
||||
{
|
||||
if (lhs->mScore == rhs->mScore)
|
||||
return stricmp(lhs->mDisplay, rhs->mDisplay) < 0;
|
||||
|
||||
return lhs->mScore > rhs->mScore;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue