Module: wine Branch: master Commit: c2c2c1117e2a78830a52a8fd8091a7ce1451b54f URL: http://source.winehq.org/git/wine.git/?a=commit;h=c2c2c1117e2a78830a52a8fd80...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Sat Feb 7 13:20:23 2009 -0500
richedit: Wrap even when message says not to repaint.
Wrapping is needed to be done even when repainting isn't done since later messages expect line breaks to reflect the current text. Some message can specify not to paint the sceen, but this should prevent wrapping from being done.
---
dlls/riched20/editor.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 2721745..032e99c 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3431,7 +3431,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, CHARFORMAT2W fmt; HDC hDC; BOOL bRepaint = LOWORD(lParam); - + if (!wParam) wParam = (WPARAM)GetStockObject(SYSTEM_FONT); GetObjectW((HGDIOBJ)wParam, sizeof(LOGFONTW), &lf); @@ -3442,8 +3442,11 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_SetDefaultCharFormat(editor, &fmt);
ME_CommitUndo(editor); + ME_MarkAllForWrapping(editor); + ME_WrapMarkedParagraphs(editor); + ME_UpdateScrollBar(editor); if (bRepaint) - ME_RewrapRepaint(editor); + ME_Repaint(editor); return 0; } case WM_SETTEXT: @@ -4139,8 +4142,11 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_SetDefaultFormatRect(editor); editor->bDefaultFormatRect = TRUE; } + ME_MarkAllForWrapping(editor); + ME_WrapMarkedParagraphs(editor); + ME_UpdateScrollBar(editor); if (msg != EM_SETRECTNP) - ME_RewrapRepaint(editor); + ME_Repaint(editor); return 0; } case EM_REQUESTRESIZE: