mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
AI Assistant UI refactor.
Fixes in debugger an autocomplete plugin (from some of the new changes in both cases). Fix UITextView not updating the aligment after padding change.
This commit is contained in:
@@ -58,7 +58,8 @@ fuzzyMatchSymbols( const std::vector<const AutoCompletePlugin::SymbolsList*>& sy
|
||||
( score = String::fuzzyMatch( pattern, symbol.text ) ) >
|
||||
std::numeric_limits<int>::min() ) {
|
||||
if ( std::find( matches.begin(), matches.end(), symbol ) == matches.end() ) {
|
||||
symbol.setScore( score );
|
||||
symbol.setScore( score +
|
||||
( symbol.kind != LSPCompletionItemKind::Text ? 100 : 0 ) );
|
||||
matches.push_back( symbol );
|
||||
|
||||
if ( matches.size() > max )
|
||||
@@ -71,11 +72,10 @@ fuzzyMatchSymbols( const std::vector<const AutoCompletePlugin::SymbolsList*>& sy
|
||||
break;
|
||||
}
|
||||
|
||||
std::sort( matches.begin(), matches.end(),
|
||||
[]( const AutoCompletePlugin::Suggestion& left,
|
||||
const AutoCompletePlugin::Suggestion& right ) {
|
||||
return left.score > right.score && left.kind != LSPCompletionItemKind::Text;
|
||||
} );
|
||||
std::sort(
|
||||
matches.begin(), matches.end(),
|
||||
[]( const AutoCompletePlugin::Suggestion& left,
|
||||
const AutoCompletePlugin::Suggestion& right ) { return left.score > right.score; } );
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user