Fix for deleting first word in the control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -675,7 +675,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
if (event.CmdDown())
|
if (event.CmdDown())
|
||||||
{
|
{
|
||||||
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
||||||
if (pos != -1 && (pos < newPos))
|
if (pos < newPos)
|
||||||
{
|
{
|
||||||
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(pos+1, newPos), this);
|
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(pos+1, newPos), this);
|
||||||
processed = true;
|
processed = true;
|
||||||
@@ -802,7 +802,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
if (event.CmdDown())
|
if (event.CmdDown())
|
||||||
{
|
{
|
||||||
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
long pos = wxRichTextCtrl::FindNextWordPosition(-1);
|
||||||
if (pos != -1 && (pos < newPos))
|
if (pos < newPos)
|
||||||
{
|
{
|
||||||
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(pos+1, newPos), this);
|
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(pos+1, newPos), this);
|
||||||
processed = true;
|
processed = true;
|
||||||
|
Reference in New Issue
Block a user