SceneNode::subscribeScheduledUpdate checks if subscriber already is in the remove list and removes it from it.

EventDispatcher now dispatches mouse up even if there's a node dragging.
SyntaxColorScheme now defaults to eepp.
UICodeEditor: Now can customize the blink time. Better minimap highlighting.
ecode: ProjectDirectoryTree now matches against the full path if has a better match than the filename.
This commit is contained in:
Martín Lucas Golini
2022-05-04 19:21:58 -03:00
parent 1633c95e56
commit 36bfd081c3
7 changed files with 95 additions and 30 deletions

View File

@@ -65,8 +65,11 @@ std::shared_ptr<FileListModel> ProjectDirectoryTree::fuzzyMatchTree( const std::
std::multimap<int, int, std::greater<int>> matchesMap;
std::vector<std::string> files;
std::vector<std::string> names;
for ( size_t i = 0; i < mNames.size(); i++ )
matchesMap.insert( { String::fuzzyMatch( mNames[i], match ), i } );
for ( size_t i = 0; i < mNames.size(); i++ ) {
int matchName = String::fuzzyMatch( mNames[i], match );
int matchPath = String::fuzzyMatch( mFiles[i], match );
matchesMap.insert( { std::max( matchName, matchPath ), i } );
}
for ( auto& res : matchesMap ) {
if ( names.size() < max ) {
names.emplace_back( mNames[res.second] );