From: Jean-Philippe Bruyère Date: Fri, 28 Feb 2025 05:13:46 +0000 (+0100) Subject: TextChange: rw ChangeText, IsEmpty X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=375445c6338075b80a79b9146c86778fe6d312d2;p=jp%2Fcrow.git TextChange: rw ChangeText, IsEmpty --- diff --git a/Crow/src/Text/TextChange.cs b/Crow/src/Text/TextChange.cs index ae1362a4..68f4d2c3 100644 --- a/Crow/src/Text/TextChange.cs +++ b/Crow/src/Text/TextChange.cs @@ -11,12 +11,13 @@ namespace Crow.Text { public readonly int Start; public readonly int Length; - public readonly string ChangedText; + public string ChangedText; public int End => Start + Length; public int End2 => End + CharDiff; public int CharDiff => string.IsNullOrEmpty (ChangedText) ? - Length : ChangedText.Length - Length; + public bool IsEmpty => string.IsNullOrEmpty (ChangedText) && Length == 0; public TextChange (int position, int length, string changedText) { Start = position; Length = length;