Huw Davies (@huw) commented about dlls/riched20/tests/editor.c:
- Don't use this function if the paste operation shouldn't change the content of the
- editor (clipboard is empty, edit control is read only...).
- Also impact on undo stack is not managed.
- */
+#define send_paste(a) _send_paste(__LINE__, (a)) +static void _send_paste(unsigned int line, HWND wnd) +{
- unsigned len = SendMessageA(wnd, WM_GETTEXTLENGTH, 0, 0);
- int retries;
- for (retries = 0; retries < 7; retries++)
- {
if (retries) Sleep(15);
SendMessageA(wnd, WM_PASTE, 0, 0);
if (SendMessageA(wnd, WM_GETTEXTLENGTH, 0, 0) > len) return;
- }
It would be cleaner to use `EM_[GS]ETMODIFY` for this check.
Also note, the commit msg prefix should include `"/tests"`.