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);
|
mDocument->setSyntaxState(line,state);
|
||||||
line++;
|
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)
|
if (mEditingCount>0)
|
||||||
return line;
|
return line;
|
||||||
|
|
||||||
if (useCodeFolding())
|
if (useCodeFolding())
|
||||||
rescanFolds();
|
rescanFolds();
|
||||||
return line;
|
return line;
|
||||||
|
|
Loading…
Reference in New Issue