diff --git a/uppsrc/CodeEditor/CLogic.cpp b/uppsrc/CodeEditor/CLogic.cpp index dc46c6687..f6bbc400c 100644 --- a/uppsrc/CodeEditor/CLogic.cpp +++ b/uppsrc/CodeEditor/CLogic.cpp @@ -197,6 +197,12 @@ void CSyntax::CheckSyntaxRefresh(CodeEditor& e, int pos, const WString& text) String s = TrimLeft(e.GetUtf8Line(e.GetLine(pos))); if(s.StartsWith("#if") || s.StartsWith("#e")) e.Refresh(); + + WString h = e.GetWLine(e.GetLinePos(pos)); // block highlighting changes if start of line is changed + for(int i = 0; i < pos; i++) + if(findarg(h[i], ' ', '\t') < 0) + return; + e.Refresh(); } END_UPP_NAMESPACE diff --git a/uppsrc/CodeEditor/CodeEditor.cpp b/uppsrc/CodeEditor/CodeEditor.cpp index da17edf8a..3740cf489 100644 --- a/uppsrc/CodeEditor/CodeEditor.cpp +++ b/uppsrc/CodeEditor/CodeEditor.cpp @@ -75,8 +75,8 @@ inline bool IsComment(int a, int b) { return a == '/' && b == '*' || a == '*' && b == '/' || a == '/' && b == '/'; } -void CodeEditor::PreInsert(int pos, const WString& text) { - if(IsFullRefresh()) return; +void CodeEditor::PreInsert(int pos, const WString& text) +{ } inline bool RBR(int c) { diff --git a/uppsrc/ide/idewin.cpp b/uppsrc/ide/idewin.cpp index 877754116..12e60a1d6 100644 --- a/uppsrc/ide/idewin.cpp +++ b/uppsrc/ide/idewin.cpp @@ -712,7 +712,7 @@ void AppMain___() #endif #ifdef _DEBUG -// Ctrl::ShowRepaint(50); + Ctrl::ShowRepaint(20); _DBG_ #endif #ifdef PLATFORM_WIN32