public virtual void Undo (TextDocument doc, bool fireEvent = true) { doc.Replace (args.Offset, args.InsertionLength, args.RemovedText.Text); if (fireEvent) OnUndoDone (); }