File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public class EditableText
2424 /// <summary>
2525 /// The lines in the Text.
2626 /// </summary>
27- public string [ ] Lines { get { return lines . ToArray ( ) ; } }
27+ public IList < string > Lines => lines . ReadOnly ( ) ;
2828
2929 /// <summary>
3030 /// The new line character in the Text.
@@ -118,8 +118,8 @@ public bool IsValidRange(Range range)
118118 throw new ArgumentNullException ( nameof ( range ) ) ;
119119 }
120120
121- return range . Start . Line <= Lines . Length
122- && range . End . Line <= Lines . Length
121+ return range . Start . Line <= Lines . Count
122+ && range . End . Line <= Lines . Count
123123 && range . Start . Column <= Lines [ range . Start . Line - 1 ] . Length
124124 && range . End . Column <= Lines [ range . End . Line - 1 ] . Length + 1 ;
125125 }
You can’t perform that action at this time.
0 commit comments