| 96 | } |
| 97 | |
| 98 | void CommandPalette::asyncFuzzyMatch( const std::string& pattern, const size_t& max, |
| 99 | MatchResultCb res ) const { |
| 100 | if ( !mCurModel ) |
| 101 | return; |
| 102 | |
| 103 | mPool->run( [this, pattern, max, res]() { |
| 104 | const std::vector<std::vector<std::string>>& cmdPalette = |
| 105 | mCurModel.get() == mBaseModel.get() ? mCommandPalette : mCommandPaletteEditor; |
| 106 | res( fuzzyMatch( cmdPalette, pattern, max ) ); |
| 107 | } ); |
| 108 | } |
| 109 | |
| 110 | } // namespace ecode |
no test coverage detected