mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
51e902f873
commit
88eeb5bd26
3 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue