private void CaretOnPositionChanged(object sender, EventArgs eventArgs) { var caretLocation = TextScript.TextArea.Caret.Location; Parentheses = AvalonEditExtensions.CheckForCharacterAtLocation(TextScript.Document, caretLocation, '(', ')'); SetParenthesesHighlighter(); _NeedRaiseCaretChangedDelayed = true; ResetTimer(_Timer); }
private void CaretOnPositionChangedDelayed() { if (TextScript.TextArea.Caret == null) { return; } var caretLocation = TextScript.TextArea.Caret.Location; HighlightedWord = AvalonEditExtensions.GetWordAtLocation(TextScript.Document, caretLocation); SetWordMatchHighlighter(); }