mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
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:
parent
6ae7b1f3e0
commit
c2c2c1117e
1 changed files with 9 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue