public void Delete() { if (!CanDelete) { return; } int pos = RowManager.AbsCursorPosition; if (SelLength > 0) { this.SetUndoDelete(pos, 0); DeleteSelection(); } else { this.SetUndoDelete(pos, 1); RowManager.DeleteCurrentChar(); } }