RICHED20: EM_SETCHARFORMAT must fail and return 0 with TM_PLAINTEXT and SF_SELECTION

a_villacis at palosanto.com a_villacis at palosanto.com
Wed Sep 26 15:50:45 CDT 2007


Patch to test and fix behavior of EM_SETCHARFORMAT when TM_PLAINTEXT
selected with a previous call to EM_SETTEXTMODE. Removes one todo_wine
introduced by a previous patch.

BTW, the test in test_TM_PLAINTEXT() seemed to assume that
EM_SETCHARFORMAT with TM_PLAINTEXT in effect and SCF_SELECTION set should
change format for the entire text, not just the selection. Then, a call to
retrieve the format of a different selection would reflect the format that
was (supposedly) set
with the EM_SETCHARFORMAT message. The way the test was structured, it also
succeeds if (as actually occurs) EM_SETCHARFORMAT outright fails and leaves
the formatting unchanged (and therefore exactly the same through the test).

Changelog:
* When TM_PLAINTEXT is in effect, EM_SETCHARFORMAT should only succeed with
  wParam == 0 or wParam == SCF_ALL. It should fail on all other cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-riched20-EM_SETCHARFORMAT-TM_PLAINTEXT.patch
Type: text/x-patch
Size: 2107 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070926/3cd2cae0/attachment.bin 


More information about the wine-patches mailing list