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.
This commit is contained in:
Dylan Smith 2009-02-07 13:20:23 -05:00 committed by Alexandre Julliard
parent 6ae7b1f3e0
commit c2c2c1117e

View file

@ -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: