git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43728
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
length --;
action->GetNewParagraphs().SetPartialParagraph(true);
}
+ else if (text.length() > 0 && text.Last() == wxT('\n'))
+ length --;
action->SetPosition(pos);
// Don't take into account the last newline
if (m_newParagraphs.GetPartialParagraph())
newCaretPosition --;
+ else
+ if (m_newParagraphs.GetChildren().GetCount() > 0)
+ {
+ wxRichTextObject* p = (wxRichTextObject*) m_newParagraphs.GetChildren().GetLast()->GetData();
+ if (p->GetRange().GetLength() == 1)
+ newCaretPosition --;
+ }
newCaretPosition = wxMin(newCaretPosition, (m_buffer->GetRange().GetEnd()-1));