Several bug fixes detected with VS debugger.

This commit is contained in:
Martín Lucas Golini
2024-07-22 23:49:52 -03:00
parent 7f31761def
commit 639e20c2f0
6 changed files with 20 additions and 8 deletions

View File

@@ -1236,7 +1236,7 @@ AutoCompletePlugin::SymbolsList AutoCompletePlugin::getDocumentSymbols( TextDocu
std::string current( getPartialSymbol( doc ) );
TextPosition end = doc->getSelection().end();
for ( Int64 i = 0; i < static_cast<Int64>( doc->linesCount() ); i++ ) {
const auto& string = doc->line( i ).toUtf8();
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