Skip to content

Commit 14121d1

Browse files
author
Kapil Borle
committed
Fix range validation in TextEdit.ApplyEdit
Prior to the fix, any text editing action that tried to append text at the end of a line, would throw.
1 parent ef494a0 commit 14121d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Engine/EditableText.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public bool IsValidRange(Range range)
126126

127127
return range.Start.Line <= Lines.Count
128128
&& range.End.Line <= Lines.Count
129-
&& range.Start.Column <= Lines[range.Start.Line - 1].Length
129+
&& range.Start.Column <= Lines[range.Start.Line - 1].Length + 1
130130
&& range.End.Column <= Lines[range.End.Line - 1].Length + 1;
131131
}
132132

0 commit comments

Comments
 (0)