i changed the ADD() function to the following
if (cursorLocation.X > base.Text.Length) { base.Text = base.Text.Insert(base.Text.Length, text); } else { base.Text = base.Text.Insert(cursorLocation.X, text); }
to handle delete insertions and deletes from the end correctly
Log in to post a comment.
i changed the ADD() function to the following
if (cursorLocation.X > base.Text.Length)
{
base.Text = base.Text.Insert(base.Text.Length, text);
}
else
{
base.Text = base.Text.Insert(cursorLocation.X, text);
}
to handle delete insertions and deletes from the end correctly