Try fix invalid memory access in SyntaxDefinitions.

Added attach in Chat UI.
Some minor improvements in Http pool implementation.
This commit is contained in:
Martín Lucas Golini
2025-08-12 00:49:13 -03:00
parent 1e95c07a1f
commit 0ec2a4dba9
34 changed files with 443 additions and 187 deletions

View File

@@ -1407,8 +1407,12 @@ AutoCompletePlugin::SymbolsList AutoCompletePlugin::getDocumentSymbols( TextDocu
auto lineCount = doc->linesCount();
std::string string;
for ( Int64 i = 0; i < static_cast<Int64>( lineCount ); i++ ) {
if ( doc->getLineLength( i ) > MAX_LINE_LENGTH )
auto len = doc->getLineLength( i );
if ( len == 0 || len > MAX_LINE_LENGTH ) {
if ( len == 0 ) // Line count must have changed
lineCount = doc->linesCount();
continue;
}
doc->getLineTextToBufferUtf8( i, string );
for ( auto& match : pattern.gmatch( string ) ) {
std::string matchStr( match[0] );