1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Merge pull request #1334 from aharabada/master

Fixed classic autocomplete highlighting random letters
This commit is contained in:
Brian Fiete 2022-01-01 14:25:43 +01:00 committed by GitHub
commit 57d8b2c9ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ AutoCompleteEntry* AutoCompleteBase::AddEntry(const AutoCompleteEntry& entry, co
if (!DoesFilterMatch(entry.mDisplay, filter.c_str(), entry.mScore, matches, 256) || (entry.mNamePrefixCount < 0))
return NULL;
entry.mMatchesLength = u8_strlen((char*)filter.c_str());
entry.mMatchesLength = mDoFuzzyAutoComplete ? u8_strlen((char*)filter.c_str()) : 0;
entry.mMatches = (entry.mMatchesLength > 0) ? matches : nullptr;
auto result = AddEntry(entry);
@ -56,7 +56,7 @@ AutoCompleteEntry* AutoCompleteBase::AddEntry(const AutoCompleteEntry& entry, co
if (!DoesFilterMatch(entry.mDisplay, filter, entry.mScore, matches, 256) || (entry.mNamePrefixCount < 0))
return NULL;
entry.mMatchesLength = u8_strlen((char*)filter);
entry.mMatchesLength = mDoFuzzyAutoComplete ? u8_strlen((char*)filter) : 0;
entry.mMatches = (entry.mMatchesLength > 0) ? matches : nullptr;
auto result = AddEntry(entry);