bool NotEscape(int pos, const WString& s) { return pos == 0 || s[pos - 1] != '\\' ? true : !NotEscape(pos - 1, s); } void CodeEditor::CheckBracket(int li, int pos, int ppos, int pos0, WString ln, int d, int limit) { int li0 = li; int lvl = 1; pos += d; ppos += d; for(;;) { int c; for(;;) { while(pos < 0 || pos >= ln.GetLength()) { li += d; if(d * li >= d * limit) return; ln = GetWLine(li); pos = d < 0 ? ln.GetLength() - 1 : 0; ppos += d; } c = ln[pos]; if((c == '\"' || c == '\'') && (NotEscape(pos, ln) && ln[pos - 1] != '\'')) { pos += d; ppos += d; int lc = c; while(pos < ln.GetLength() && pos > 0) { if(ln[pos] == lc && NotEscape(pos, ln)) { pos += d; ppos += d; break; } pos += d; ppos += d; } } else break; } if(islbrkt(c)) lvl += d; if(isrbrkt(c)) lvl -= d; if(lvl <= 0) { highlight_bracket_pos0 = pos0; highlight_bracket_pos = ppos; RefreshLine(li); RefreshLine(li0); bracket_start = GetTimeClick(); return; } pos += d; ppos += d; } }
luzr wrote on Tue, 25 September 2007 16:01 |
Well, neverming how do you want to call that color, it is now fixed... Quick fix: (would be nice to test it thoroughly...): |
Quote: |
BTW, i wanted to ask you since some days... the svn is the up-to-date development version, or is an outdated one ? and, if it's outdated, there's some way to stay in sync with latest devel versions ? |