riched20: Fix behavior of EM_REPLACESEL with painting disabled
Alex Villacís Lasso
a_villacis at palosanto.com
Mon Apr 21 10:02:52 CDT 2008
I noticed a style being applied on an incorrect region in an application
called RadDecay. The red font was being applied only to a part of the
line. I traced this to the app disabling updates on the richedit control
used for displaying information, and then adding text with
EM_REPLACESEL. The StartRow run is not being inserted at the start of
the paragraph when painting is disabled, resulting in an incorrect line
count being reported by EM_GETLINECOUNT, and therefore the app
calculating the wrong offsets for applying the style. Fixed by moving
the relevant call to ME_WrappedMarkedParagraphs() to a place before the
check for painting being enabled. With tests that failed before the fix
and now succeed.
* Fix behavior of line splitting by EM_REPLACESEL with a text with
newlines and window updating disabled.
* Tests to verify fixed behavior.
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7194 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080421/5e403f74/attachment.bin
More information about the wine-patches