Fix project search error incorrectly counting the result line number when searching with the wholeword flag.

A couple of minor fixes.
This commit is contained in:
Martín Lucas Golini
2024-03-13 20:14:41 -03:00
parent b7a754a3c8
commit 6db1e5ec43
3 changed files with 18 additions and 12 deletions

View File

@@ -3862,19 +3862,23 @@ static void exportLanguages( const std::string& path, const std::string& langs )
std::vector<SyntaxDefinition> defs;
if ( !langs.empty() ) {
auto langss = String::split( langs, ',' );
for ( const auto& l : langss ) {
const auto& sd = sdm->getByLSPName( l );
if ( langs == "all" ) {
defs = sdm->getDefinitions();
} else {
auto langss = String::split( langs, ',' );
for ( const auto& l : langss ) {
const auto& sd = sdm->getByLSPName( l );
if ( !sd.getLanguageName().empty() ) {
defs.push_back( sd );
continue;
if ( !sd.getLanguageName().empty() ) {
defs.push_back( sd );
continue;
}
const auto& sd2 = sdm->getByLanguageName( l );
if ( !sd2.getLanguageName().empty() )
defs.push_back( sd2 );
}
const auto& sd2 = sdm->getByLanguageName( l );
if ( !sd2.getLanguageName().empty() )
defs.push_back( sd2 );
}
}