diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 413f457f..969c60b5 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -3274,8 +3274,6 @@ void QSynEdit::updateModifiedStatus() void QSynEdit::reparseLines(int startLine, int endLine) { - if (mEditingCount>0) - return; SyntaxState state; startLine = std::max(0,startLine); @@ -3295,8 +3293,11 @@ void QSynEdit::reparseLines(int startLine, int endLine) mSyntaxer->nextToEol(); state = mSyntaxer->getState(); mDocument->setSyntaxState(line,state); - line ++ ; + line++ ; } while (line < endLine); + + if (mEditingCount>0) + return; if (useCodeFolding()) rescanFolds(); return ; @@ -5428,7 +5429,7 @@ int QSynEdit::doInsertTextByNormalMode(const BufferCoord& pos, const QStringList str = sLeftSide + text[0] + sRightSide; properSetLine(caretY - 1, str); } - reparseLines(caretY,caretY+1); + reparseLines(caretY-1,caretY); // step2: insert remaining lines of Value for (int i=1;i