We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a421ca commit d796058Copy full SHA for d796058
1 file changed
Engine/EditableText.cs
@@ -24,7 +24,7 @@ public class EditableText
24
/// <summary>
25
/// The lines in the Text.
26
/// </summary>
27
- public string[] Lines { get { return lines.ToArray(); } }
+ public IList<string> Lines => lines.ReadOnly();
28
29
30
/// The new line character in the Text.
@@ -118,8 +118,8 @@ public bool IsValidRange(Range range)
118
throw new ArgumentNullException(nameof(range));
119
}
120
121
- return range.Start.Line <= Lines.Length
122
- && range.End.Line <= Lines.Length
+ return range.Start.Line <= Lines.Count
+ && range.End.Line <= Lines.Count
123
&& range.Start.Column <= Lines[range.Start.Line - 1].Length
124
&& range.End.Column <= Lines[range.End.Line - 1].Length + 1;
125
0 commit comments