aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2025-02-28 06:13:46 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2025-02-28 06:13:46 +0100
commit375445c6338075b80a79b9146c86778fe6d312d2 (patch)
treea38331154c09fd96ba0f13e2bec1fb5887bf4507
parent9076776696efe1300efd339c999dfe49a62eb7ee (diff)
TextChange: rw ChangeText, IsEmpty
-rw-r--r--Crow/src/Text/TextChange.cs3
1 files changed, 2 insertions, 1 deletions
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;