void DoBraceMatching()
{
int length = scintilla.GetLength();
if (length == 0)
{
return;
}
int pos = scintillaWrapper.CurrentPos;
if (pos == 0 || scintilla.PositionBefore(pos) == (pos-1))
{
if (NonCommentBraceCheck(pos - 1) || CommentBraceCheck(pos - 1))
{
return;
}
}
if (pos < length && scintilla.PositionAfter(pos) == (pos+1))
{
if (NonCommentBraceCheck(pos) || CommentBraceCheck(pos))
{
return;
}
}
scintilla.BraceHighlight(-1, -1);
return;
}