From 1812d61c8c807d33005236d5a1398fcf93db52d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Sat, 1 Jan 2022 13:17:53 +0100 Subject: [PATCH] Classic autocomplete no longer highlights random letters --- IDEHelper/Compiler/BfAutoComplete.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDEHelper/Compiler/BfAutoComplete.cpp b/IDEHelper/Compiler/BfAutoComplete.cpp index 144e2826..57599426 100644 --- a/IDEHelper/Compiler/BfAutoComplete.cpp +++ b/IDEHelper/Compiler/BfAutoComplete.cpp @@ -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);