Some optimizations.

This commit is contained in:
Martín Lucas Golini
2024-06-06 00:58:56 -03:00
parent efbc2c87bc
commit a106b0d109
7 changed files with 40 additions and 16 deletions

View File

@@ -1226,8 +1226,8 @@ AutoCompletePlugin::SymbolsList AutoCompletePlugin::getDocumentSymbols( TextDocu
return symbols;
std::string current( getPartialSymbol( doc ) );
TextPosition end = doc->getSelection().end();
for ( Int64 i = 0; i < lc; i++ ) {
const auto& string = doc->line( i ).getText().toUtf8();
for ( Int64 i = 0; i < static_cast<Int64>( doc->linesCount() ); i++ ) {
const auto& string = doc->line( i ).toUtf8();
for ( auto& match : pattern.gmatch( string ) ) {
std::string matchStr( match[0] );
// Ignore the symbol if is actually the current symbol being written