Commit 6072a69d authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Keep default char format on WM_SETFONT in plain text mode.

parent 4f2e15d0
...@@ -3502,7 +3502,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3502,7 +3502,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
CHARFORMAT2W fmt; CHARFORMAT2W fmt;
HDC hDC; HDC hDC;
BOOL bRepaint = LOWORD(lParam); BOOL bRepaint = LOWORD(lParam);
ME_Cursor start;
if (!wParam) if (!wParam)
wParam = (WPARAM)GetStockObject(SYSTEM_FONT); wParam = (WPARAM)GetStockObject(SYSTEM_FONT);
...@@ -3510,8 +3509,11 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3510,8 +3509,11 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
hDC = ITextHost_TxGetDC(editor->texthost); hDC = ITextHost_TxGetDC(editor->texthost);
ME_CharFormatFromLogFont(hDC, &lf, &fmt); ME_CharFormatFromLogFont(hDC, &lf, &fmt);
ITextHost_TxReleaseDC(editor->texthost, hDC); ITextHost_TxReleaseDC(editor->texthost, hDC);
if (editor->mode & TM_RICHTEXT) {
ME_Cursor start;
ME_SetCursorToStart(editor, &start); ME_SetCursorToStart(editor, &start);
ME_SetCharFormat(editor, &start, NULL, &fmt); ME_SetCharFormat(editor, &start, NULL, &fmt);
}
ME_SetDefaultCharFormat(editor, &fmt); ME_SetDefaultCharFormat(editor, &fmt);
ME_CommitUndo(editor); ME_CommitUndo(editor);
......
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