diff --git a/premake4.lua b/premake4.lua index 9e9f5a256..6de048a03 100644 --- a/premake4.lua +++ b/premake4.lua @@ -1090,7 +1090,7 @@ solution "eepp" set_targetdir("libs/" .. os.get_real() .. "/thirdparty/") includedirs { "src/thirdparty/libvorbis/lib/", "src/thirdparty/libogg/include", "src/thirdparty/libvorbis/include" } files { "src/thirdparty/libogg/**.c", "src/thirdparty/libvorbis/**.c" } - build_base_cpp_configuration( "vorbis" ) + build_base_configuration( "vorbis" ) project "pugixml-static" kind "StaticLib" diff --git a/src/tools/ecode/commandpalette.cpp b/src/tools/ecode/commandpalette.cpp index a153e37dd..067e47bbb 100644 --- a/src/tools/ecode/commandpalette.cpp +++ b/src/tools/ecode/commandpalette.cpp @@ -75,15 +75,13 @@ CommandPalette::fuzzyMatch( const std::vector>& cmdPale std::vector> ret; for ( size_t i = 0; i < cmdPalette.size(); i++ ) { - int matchName = String::fuzzyMatch( cmdPalette[i][0], match ); - int matchKeybind = String::fuzzyMatch( cmdPalette[i][1], match ); + int matchName = String::fuzzyMatch( cmdPalette[i][0], match, true, true ); + int matchKeybind = String::fuzzyMatch( cmdPalette[i][2], match, true, true ); matchesMap.insert( { std::max( matchName, matchKeybind ), i } ); } for ( auto& res : matchesMap ) { - if ( ret.size() < max ) { - ret.push_back( { cmdPalette[res.second][0], cmdPalette[res.second][1], - cmdPalette[res.second][2] } ); - } + if ( ret.size() < max ) + ret.push_back( cmdPalette[res.second] ); } return CommandPaletteModel::create( 3, ret ); } diff --git a/src/tools/ecode/universallocator.cpp b/src/tools/ecode/universallocator.cpp index ddde7be82..97b1408dc 100644 --- a/src/tools/ecode/universallocator.cpp +++ b/src/tools/ecode/universallocator.cpp @@ -403,7 +403,7 @@ void UniversalLocator::updateCommandPaletteTable() { if ( txt.size() > 1 ) { #if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN || defined( __EMSCRIPTEN_PTHREADS__ ) - mCommandPalette.asyncFuzzyMatch( txt.substr( 1 ), 1000, [this]( auto res ) { + mCommandPalette.asyncFuzzyMatch( txt.substr( 1 ).trim(), 10000, [this]( auto res ) { mUISceneNode->runOnMainThread( [this, res] { mLocateTable->setModel( res ); mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) ); @@ -411,7 +411,7 @@ void UniversalLocator::updateCommandPaletteTable() { } ); } ); #else - mLocateTable->setModel( mCommandPalette.fuzzyMatch( txt.substr(), 1000 ) ); + mLocateTable->setModel( mCommandPalette.fuzzyMatch( txt.substr( 1 ).trim(), 10000 ) ); mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) ); mLocateTable->scrollToTop(); #endif