diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 5ebd0ee..3cbc12f 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1823,6 +1823,8 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; BOOL shift_is_down = GetKeyState(VK_SHIFT) & 0x8000; + if (GetCapture() == editor->hWnd) + return FALSE; if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey != VK_MENU) editor->nSelectionType = stPosition; @@ -3515,7 +3517,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, switch (wstr) { case 22: /* Ctrl-V */ - SendMessageW(editor->hWnd, WM_PASTE, 0, 0); + if (GetCapture() != editor->hWnd) + SendMessageW(editor->hWnd, WM_PASTE, 0, 0); return 0; case 24: /* Ctrl-X */ SendMessageW(editor->hWnd, WM_CUT, 0, 0); @@ -3527,9 +3530,10 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, SendMessageW(editor->hWnd, EM_UNDO, 0, 0); return 0; } - if (((unsigned)wstr)>=' ' - || (wstr=='\r' && (GetWindowLongW(hWnd, GWL_STYLE) & ES_MULTILINE)) - || wstr=='\t') { + if ((((unsigned)wstr)>=' ' + || (wstr=='\r' && (GetWindowLongW(hWnd, GWL_STYLE) & ES_MULTILINE)) + || wstr=='\t') + && GetCapture() != editor->hWnd) { int from, to; BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; ME_GetSelection(editor, &from, &to);