mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-15 15:32:51 +03:00
File / path and command fuzzy match improvements.
This commit is contained in:
@@ -118,8 +118,8 @@ ProjectDirectoryTree::fuzzyMatchTree( const std::vector<std::string>& matches, c
|
||||
std::vector<std::string> names;
|
||||
for ( const auto& match : matches ) {
|
||||
for ( size_t i = 0; i < mNames.size(); i++ ) {
|
||||
int matchName = String::fuzzyMatch( mNames[i], match );
|
||||
int matchPath = String::fuzzyMatch( mFiles[i], match );
|
||||
int matchName = String::fuzzyMatch( match, mNames[i], true );
|
||||
int matchPath = String::fuzzyMatch( match, mFiles[i], true );
|
||||
matchesMap.insert( { std::max( matchName, matchPath ), i } );
|
||||
}
|
||||
}
|
||||
@@ -144,8 +144,8 @@ ProjectDirectoryTree::fuzzyMatchTree( const std::string& match, const size_t& ma
|
||||
std::vector<std::string> files;
|
||||
std::vector<std::string> names;
|
||||
for ( size_t i = 0; i < mNames.size(); i++ ) {
|
||||
int matchName = String::fuzzyMatch( mNames[i], match );
|
||||
int matchPath = String::fuzzyMatch( mFiles[i], match );
|
||||
int matchName = String::fuzzyMatch( match, mNames[i], true );
|
||||
int matchPath = String::fuzzyMatch( match, mFiles[i], true );
|
||||
matchesMap.insert( { std::max( matchName, matchPath ), i } );
|
||||
}
|
||||
for ( auto& res : matchesMap ) {
|
||||
|
||||
Reference in New Issue
Block a user