Hi,

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.




2014-07-15 17:23 GMT+08:00 Huw Davies <huw@codeweavers.com>:
On 15 Jul 2014, at 02:18, Jactry Zeng wrote:
> But because of bug of EM_SETSEL or EM_GETSEL, this feature
> still cannot be implemented completely.
> For example:
> When the text in Rich Edit control is: "TestSomeText"
> �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��01234567890123
> We cannot distinguish between SendMessageA(w, EM_SETSEL, 0, 12) and SendMessageA(w, EM_SETSEL, 0, 13).
> Attachment is the patch, I just added wine_todo for failed tests cause by this bug.
> But I still have no idea about fixing this bug. Could you give me some suggestion?
> Or just mark them as todo now is OK?

Do you fully understand this bug yet? ��In other words under what conditions does the current implementation fail?
It should be trivial to fix up ME_SetSelection().

Huw.




--
Regards,
Jactry Zeng