public void Undo() { TextPoint p = Document.Undo(); if (p.X != - 1 && p.Y != - 1) { Caret.Position = p; Selection.ClearSelection(); ScrollIntoView(); } }