riched20: add EM_EXSETSEL conformance tests and fixes bug 4462

Dan Kegel dank at
Fri Mar 17 02:10:25 CST 2006

Nice touch including the link to the bug!

Did you run the new test on Windows?

+    if(range.cpMin < 0)
+    {
+        range.cpMin = end;
+        range.cpMax = end;
+    }
+ ...
+    return (range.cpMax < textlen+1 ? range.cpMax : textlen+1) ;

MSDN says the return value is the range, not just cpMax.  Are they really wrong?
Also, I suspect you want to limit cpMax at the same time as you do cpMin,
not after the fact... otherwise aren't you passing an invalid cpMax to
ME_SetSelection() ?

Finally, there are trivial whitespace style violations, I think
(missing space between if and the open paren).
- Dan

Wine for Windows ISVs:

More information about the wine-devel mailing list