long startPos = 0, endPos = 0;
wxRichTextObject* obj = GetBuffer().GetLeafObjectAtPosition(position);
if (obj)
{
startPos = obj->GetRange().GetStart();
endPos = obj->GetRange().GetEnd();
long startPos = 0, endPos = 0;
wxRichTextObject* obj = GetBuffer().GetLeafObjectAtPosition(position);
if (obj)
{
startPos = obj->GetRange().GetStart();
endPos = obj->GetRange().GetEnd();