Commit c3e6cb5b authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

riched20: Don't create a display context in InvalidateParagraphRange().

parent b466eefb
...@@ -1093,28 +1093,25 @@ void ME_InvalidateParagraphRange(ME_TextEditor *editor, ...@@ -1093,28 +1093,25 @@ void ME_InvalidateParagraphRange(ME_TextEditor *editor,
ME_DisplayItem *start_para, ME_DisplayItem *start_para,
ME_DisplayItem *last_para) ME_DisplayItem *last_para)
{ {
ME_Context c;
RECT rc; RECT rc;
int ofs; int ofs;
ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost)); rc = editor->rcFormat;
rc = c.rcView;
ofs = editor->vert_si.nPos; ofs = editor->vert_si.nPos;
if (start_para) { if (start_para)
{
start_para = ME_GetOuterParagraph(start_para); start_para = ME_GetOuterParagraph(start_para);
last_para = ME_GetOuterParagraph(last_para); last_para = ME_GetOuterParagraph(last_para);
rc.top = c.rcView.top + start_para->member.para.pt.y - ofs; rc.top += start_para->member.para.pt.y - ofs;
} else { } else {
rc.top = c.rcView.top + editor->nTotalLength - ofs; rc.top += editor->nTotalLength - ofs;
} }
if (editor->nTotalLength < editor->nLastTotalLength) if (editor->nTotalLength < editor->nLastTotalLength)
rc.bottom = c.rcView.top + editor->nLastTotalLength - ofs; rc.bottom = editor->rcFormat.top + editor->nLastTotalLength - ofs;
else else
rc.bottom = c.rcView.top + last_para->member.para.pt.y + last_para->member.para.nHeight - ofs; rc.bottom = editor->rcFormat.top + last_para->member.para.pt.y + last_para->member.para.nHeight - ofs;
ITextHost_TxInvalidateRect(editor->texthost, &rc, TRUE); ITextHost_TxInvalidateRect(editor->texthost, &rc, TRUE);
ME_DestroyContext(&c);
} }
......
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