optimize the speed for editing big source file
This commit is contained in:
parent
30e7751abf
commit
7b0b0587cd
|
@ -3293,10 +3293,15 @@ int QSynEdit::reparseLines(int startLine, int endLine)
|
|||
}
|
||||
mDocument->setSyntaxState(line,state);
|
||||
line++;
|
||||
} while (line < endLine);
|
||||
} while (line < mDocument->count());
|
||||
|
||||
//don't rescan folds if only currentLine is reparsed
|
||||
if (line-startLine==1)
|
||||
return line;
|
||||
|
||||
if (mEditingCount>0)
|
||||
return line;
|
||||
|
||||
if (useCodeFolding())
|
||||
rescanFolds();
|
||||
return line;
|
||||
|
|
Loading…
Reference in New Issue