Debug - 2009-05-15

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