diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 9678328989..300a87d678 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -963,7 +963,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) } } - if (!processed) + if (!processed && newPos < (GetLastPosition()-1)) GetBuffer().DeleteRangeWithUndo(wxRichTextRange(newPos+1, newPos+1), this); }