CodeEditor: Fixed block highlighting issue #983

git-svn-id: svn://ultimatepp.org/upp/trunk@8181 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-02-15 16:21:54 +00:00
parent 51e902f873
commit 88eeb5bd26
3 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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) {