From e1ebf52d9d54e2539f604745c9fea8a7783b45ac Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 28 Sep 2024 09:44:31 +0800 Subject: [PATCH] fix: #485 syntax highlight status not correctly updated after modification. --- libs/qsynedit/qsynedit/qsynedit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 1515e1eb..d2248b74 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -5417,8 +5417,7 @@ int QSynEdit::doInsertTextByNormalMode(const BufferCoord& pos, const QStringList reparseLines(caretY-1,caretY, false, false); result++; } - if (useCodeFolding()) - rescanFolds(); + reparseLines(caretY, caretY+1); bChangeScroll = !mOptions.testFlag(EditorOption::ScrollPastEol); mOptions.setFlag(EditorOption::ScrollPastEol); auto action = finally([&,this]{