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

riched20: Don't invalidate while inside TxDraw().

parent e668aa9d
......@@ -202,7 +202,7 @@ void ME_DestroyContext(ME_Context *c) DECLSPEC_HIDDEN;
BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) DECLSPEC_HIDDEN;
void para_range_invalidate( ME_TextEditor *editor, ME_Paragraph *start_para, ME_Paragraph *last_para ) DECLSPEC_HIDDEN;
void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN;
BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc ) DECLSPEC_HIDDEN;
BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc, BOOL invalidate ) DECLSPEC_HIDDEN;
/* para.c */
void editor_get_selection_paras(ME_TextEditor *editor, ME_Paragraph **para, ME_Paragraph **para_end ) DECLSPEC_HIDDEN;
......
......@@ -192,7 +192,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxDraw( ITextServices *iface, DWORD
if (rewrap)
{
editor_mark_rewrap_all( services->editor );
wrap_marked_paras_dc( services->editor, dc );
wrap_marked_paras_dc( services->editor, dc, FALSE );
}
editor_draw( services->editor, dc, update );
......
......@@ -1020,7 +1020,7 @@ static void adjust_para_y( ME_Paragraph *para, ME_Context *c, struct repaint_ran
}
}
BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc )
BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc, BOOL invalidate )
{
ME_Paragraph *para, *next;
struct wine_rb_entry *entry, *next_entry = NULL;
......@@ -1086,7 +1086,7 @@ BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc )
ME_DestroyContext(&c);
if (repaint.start || editor->nTotalLength < editor->nLastTotalLength)
if (invalidate && (repaint.start || editor->nTotalLength < editor->nLastTotalLength))
para_range_invalidate( editor, repaint.start, repaint.end);
return !!repaint.start;
}
......@@ -1094,7 +1094,7 @@ BOOL wrap_marked_paras_dc( ME_TextEditor *editor, HDC hdc )
BOOL ME_WrapMarkedParagraphs( ME_TextEditor *editor )
{
HDC hdc = ITextHost_TxGetDC( editor->texthost );
BOOL ret = wrap_marked_paras_dc( editor, hdc );
BOOL ret = wrap_marked_paras_dc( editor, hdc, TRUE );
ITextHost_TxReleaseDC( editor->texthost, hdc );
return ret;
}
......
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