riched20: Guard paragraph wrapping against special case where type is diTextStart.

Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sergio Gómez Del Real 2018-11-29 08:44:52 -05:00 committed by Alexandre Julliard
parent ad58875642
commit 618f0a8b2a
1 changed files with 3 additions and 1 deletions

View File

@ -596,7 +596,9 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
}
/* force rewrap of the */
mark_para_rewrap(editor, run_para->member.para.prev_para);
if (run_para->member.para.prev_para->type == diParagraph)
mark_para_rewrap(editor, run_para->member.para.prev_para);
mark_para_rewrap(editor, new_para->member.para.prev_para);
/* we've added the end run, so we need to modify nCharOfs in the next paragraphs */