private void CaretOnPositionChangedDelayed() { if (TextScript.TextArea.Caret == null) { return; } var caretLocation = TextScript.TextArea.Caret.Location; HighlightedWord = AvalonEditExtensions.GetWordAtLocation(TextScript.Document, caretLocation); SetWordMatchHighlighter(); }