From 67252bc96ed5988dec70dfd5c0b9786cd4d5d78e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 28 Sep 2008 18:01:47 +0000 Subject: [PATCH] Fix for deleting first word in the control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index ae9712fa79..0c6680f92e 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -668,7 +668,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; @@ -795,7 +795,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;