diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index d92397e5258..e35e3cb1551 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4148,7 +4148,9 @@ LRESULT WINAPI RichEdit10ANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM { ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongPtrW(hWnd, 0); + TRACE("Emulating version 1.0 (hWnd=%p)\n", hWnd); editor->bEmulateVersion10 = TRUE; + editor->bWordWrap = (GetWindowLongW(hWnd, GWL_STYLE) & ES_AUTOHSCROLL) ? FALSE : TRUE; editor->pBuffer->pLast->member.para.nCharOfs = 2; assert(editor->pBuffer->pLast->prev->type == diRun); assert(editor->pBuffer->pLast->prev->member.run.nFlags & MERF_ENDPARA); diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index 15876f42be6..5fef5711063 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -849,13 +849,13 @@ static void test_word_wrap(void) res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); ok(res, "WM_SETTEXT failed.\n"); pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - todo_wine ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); + ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - todo_wine ok(lines > 1, "Line was expected to wrap (lines=%d).\n", lines); + ok(lines > 1, "Line was expected to wrap (lines=%d).\n", lines); SetWindowLong(hwnd, GWL_STYLE, dwCommonStyle|WS_HSCROLL|ES_AUTOHSCROLL); pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - todo_wine ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); + ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); DestroyWindow(hwnd); hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, dwCommonStyle|ES_AUTOHSCROLL,