On 15 Jul 2014, at 13:51, Jactry Zeng wrote:
Thanks for your reply. I am not sure if my understanding is right or not...
- ME_GetSelection(This->reOle->editor, &start, &end);
- nChars = ME_GetCursorOfs(end) - ME_GetCursorOfs(start);
- bEOP = (end->pRun->type == diTextEnd);
Here I would like to use ME_GetSelection() to get the end of the selection range. And than judge if it is the end of the text buffer and pass bEOP into ME_GetTextW. If bEOP is true, ME_GetTextW will append a '\r' in the end of the return string. But because of bug of ME_GetSelection/ME_SetSelection, I can't got a ME_Cursor of the end of the text buffer.
My point is, we should fix the bug in S/GetSelection first. There's no point in working around this bug.
Huw.