From 375445c6338075b80a79b9146c86778fe6d312d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Fri, 28 Feb 2025 06:13:46 +0100 Subject: [PATCH] TextChange: rw ChangeText, IsEmpty --- Crow/src/Text/TextChange.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.3