Module: wine Branch: master Commit: 4c28a5bcfb7c3818eff8d9a423a954d851a1c302 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c28a5bcfb7c3818eff8d9a423...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Sun Oct 26 23:38:15 2008 -0400
richedit: Fixed initial word wrap setting when emulating 1.0.
---
dlls/riched20/editor.c | 2 ++ dlls/riched32/tests/editor.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index d92397e..e35e3cb 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 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,