On Thu, Oct 29, 2015 at 02:02:23PM +0800, Jactry Zeng wrote:
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 98c7414..a54c0c7 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2442,6 +2442,32 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) return TRUE; } break;
- case VK_OEM_PLUS:
if (ctrl_is_down)
{
CHARFORMAT2W fmt;
ZeroMemory(&fmt, sizeof(fmt));
fmt.cbSize = sizeof(CHARFORMAT2W);
SendMessageW(editor->hWnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&fmt);
if (shift_is_down)
{
if (fmt.dwEffects & CFE_SUBSCRIPT)
fmt.dwEffects &= ~CFE_SUBSCRIPT;
fmt.dwMask = CFM_SUPERSCRIPT;
fmt.dwEffects ^= CFE_SUPERSCRIPT;
}
else
{
if (fmt.dwEffects & CFE_SUPERSCRIPT)
fmt.dwEffects &= ~CFE_SUPERSCRIPT;
fmt.dwMask = CFM_SUBSCRIPT;
fmt.dwEffects ^= CFE_SUBSCRIPT;
}
SendMessageW(editor->hWnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&fmt);
return TRUE;
}
case VK_ESCAPE: if (editor->bDialogMode && editor->hwndParent) PostMessageW(editor->hwndParent, WM_CLOSE, 0, 0);break;
Again, it shouldn't be too hard to add a test for this. We do similar tests by sending WM_KEYDOWN/UP messages to the control.
Huw.
2015-11-03 22:39 GMT+08:00 Huw Davies huw@codeweavers.com:
Again, it shouldn't be too hard to add a test for this. We do similar
tests
by sending WM_KEYDOWN/UP messages to the control.
For this patch, I also had some tests local. But I found the way we did in send_ctrl_key() can't simulate a three-keys shortcut key in Windows(though it works for Wine).
I ran it on testbot: https://testbot.winehq.org/JobDetails.pl?Key=17961 (dwEffects was expected as 0x44020001)
Thanks again!