Allow to drag folder into the editor and it will load the folder (SpartanJ/ecode/314).

Flag the document as modified until saved when changing it's line ending (SpartanJ/ecode/315).
Avoid processing document symbols on huge files. Avoid matching brackets on huge files.
This commit is contained in:
Martín Lucas Golini
2024-08-29 18:20:17 -03:00
parent a10f587545
commit 73a868db55
8 changed files with 42 additions and 12 deletions

View File

@@ -1235,8 +1235,7 @@ void AutoCompletePlugin::resetSignatureHelp() {
AutoCompletePlugin::SymbolsList AutoCompletePlugin::getDocumentSymbols( TextDocument* doc ) {
LuaPattern pattern( mSymbolPattern );
AutoCompletePlugin::SymbolsList symbols;
Int64 lc = doc->linesCount();
if ( lc == 0 || lc > 50000 || mShuttingDown )
if ( doc->linesCount() == 0 || doc->isHuge() || mShuttingDown )
return symbols;
std::string current( getPartialSymbol( doc ) );
TextPosition end = doc->getSelection().end();