Commit 4c28a5bc authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Fixed initial word wrap setting when emulating 1.0.

parent 9b4c8211
......@@ -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);
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment