Fixed SyntaxHighlighting

This commit is contained in:
Tig
2024-11-07 16:02:00 -07:00
parent 1013b90d0a
commit 054559a6ae
2 changed files with 4 additions and 8 deletions

View File

@@ -3646,7 +3646,7 @@ public class TextView : View
_isDrawing = false;
return true;
return false;
}
/// <inheritdoc/>

View File

@@ -281,17 +281,13 @@ public class SyntaxHighlighting : Scenario
AllSuggestions = _keywords.ToList ()
};
_textView.TextChanged += (s, e) => HighlightTextBasedOnKeywords ();
_textView.DrawingContent += (s, e) => HighlightTextBasedOnKeywords ();
_textView.DrawComplete += (s, e) => HighlightTextBasedOnKeywords ();
// DrawingText happens before DrawingContent so we use it to highlight
_textView.DrawingText += (s, e) => HighlightTextBasedOnKeywords ();
}
private void ClearAllEvents ()
{
_textView.ClearEventHandlers ("TextChanged");
_textView.ClearEventHandlers ("DrawContent");
_textView.ClearEventHandlers ("DrawContentComplete");
_textView.ClearEventHandlers ("DrawingText");
_textView.InheritsPreviousAttribute = false;
}