Fix caret position when deleting last character
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5607c89090
commit
6ccbca24ee
@ -6269,7 +6269,11 @@ bool wxRichTextAction::Do()
|
||||
m_buffer->UpdateRanges();
|
||||
m_buffer->Invalidate(wxRichTextRange(GetRange().GetStart(), GetRange().GetStart()));
|
||||
|
||||
UpdateAppearance(GetRange().GetStart()-1, true /* send update event */);
|
||||
long caretPos = GetRange().GetStart()-1;
|
||||
if (caretPos >= m_buffer->GetRange().GetEnd())
|
||||
caretPos --;
|
||||
|
||||
UpdateAppearance(caretPos, true /* send update event */);
|
||||
|
||||
wxRichTextEvent cmdEvent(
|
||||
wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED,
|
||||
|
Loading…
Reference in New Issue
Block a user