Commit c2c2c111 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent 6ae7b1f3
......@@ -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:
......
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