]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't delete previous character when pressing Del at end of buffer.
authorJulian Smart <julian@anthemion.co.uk>
Wed, 3 Feb 2010 09:51:53 +0000 (09:51 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 3 Feb 2010 09:51:53 +0000 (09:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 96783289893e6e72b9014ff790771944f0a59172..300a87d678d356863e61ead075e533a57ba094c3 100644 (file)
@@ -963,7 +963,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
                 }
             }
 
                 }
             }
 
-            if (!processed)
+            if (!processed && newPos < (GetLastPosition()-1))
                 GetBuffer().DeleteRangeWithUndo(wxRichTextRange(newPos+1, newPos+1), this);
         }
 
                 GetBuffer().DeleteRangeWithUndo(wxRichTextRange(newPos+1, newPos+1), this);
         }