public char GetCharAt(int offset)
{
DebugVerifyAccess(); // frequently called, so must be fast in release builds
return rope[offset];
}
private void CloseBracket(TextEditor.TextEditor editor, TextDocument document, string text) { if (text[0].IsCloseBracketChar() && editor.CaretIndex < document.TextLength && editor.CaretIndex > 0) { if (document.GetCharAt(editor.CaretIndex) == text[0]) { document.Replace(editor.CaretIndex - 1, 1, string.Empty); } } }