diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index d92397e..20146dc 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4149,6 +4149,7 @@ LRESULT WINAPI RichEdit10ANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongPtrW(hWnd, 0); 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 15876f4..5fef571 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,