]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for deleting first word in the control
authorJulian Smart <julian@anthemion.co.uk>
Sun, 28 Sep 2008 18:02:23 +0000 (18:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 28 Sep 2008 18:02:23 +0000 (18:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 3a6432a531aea0d46864c62087893b9f079fdd08..ef6ed5486d326368b65cbef8c45dfb44955bc9ad 100644 (file)
@@ -300,7 +300,7 @@ void wxRichTextCtrl::DoThaw()
         LayoutContent();
     else
         SetupScrollbars();
-    
+
     wxWindow::DoThaw();
 }
 
@@ -675,7 +675,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
                 if (event.CmdDown())
                 {
                     long pos = wxRichTextCtrl::FindNextWordPosition(-1);
-                    if (pos != -1 && (pos < newPos))
+                    if (pos < newPos)
                     {
                         GetBuffer().DeleteRangeWithUndo(wxRichTextRange(pos+1, newPos), this);
                         processed = true;
@@ -802,7 +802,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
             if (event.CmdDown())
             {
                 long pos = wxRichTextCtrl::FindNextWordPosition(-1);
-                if (pos != -1 && (pos < newPos))
+                if (pos < newPos)
                 {
                     GetBuffer().DeleteRangeWithUndo(wxRichTextRange(pos+1, newPos), this);
                     processed = true;