[PATCH 1/2] riched20: Implement ITextSelection::GetText. (try 3)

Jactry Zeng jactry92 at gmail.com
Wed Jul 16 08:36:03 CDT 2014


2014-07-16 19:44 GMT+08:00 Huw Davies <huw at codeweavers.com>:
>
> Yes.  So adding a special case to SetSelection should fix this.
>
> 'to' is already setup correctly to len+1, so the problem is
> adjusting cursors[0].  MoveCursorChars is clamping the
> cursor to len.
>
> So you have two options, either alter MoveCursorChars
> to allow it to move to len + 1. You'd need to retain the current
> behaviour in some circumstances though (such as moving
> to the right on right-arrow keys press), so you'd need to pass
> a flag or something.
>
> Option 2 is just the modify cursor[0] in SetSelection.  If this
> is the only place where one can select the final EOP, then
> this is probably the preferred solution.
>
> Either way, you probably need to change the 'middle of
> end paragraph run' fix up for cursor[0] at the end of
> SetSelection (probably by setting nOffset = run.len).
>
> Having done this, check the tests still work (and the
> todos are fixed). Also play with wordpad for a while
> to see it behaves correctly.
>
> Does that make sense?

Thank you!
I will have a try.


-- 
Regards,
Jactry Zeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140716/89146d9d/attachment.html>


More information about the wine-devel mailing list