Module: wine
Branch: master
Commit: 618f0a8b2aa1786268d452dfd17d8aaaea399d97
URL: https://source.winehq.org/git/wine.git/?a=commit;h=618f0a8b2aa1786268d452df…
Author: Sergio Gómez Del Real <sdelreal(a)codeweavers.com>
Date: Thu Nov 29 08:44:52 2018 -0500
riched20: Guard paragraph wrapping against special case where type is diTextStart.
Signed-off-by: Sergio Gómez Del Real <sdelreal(a)codeweavers.com>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/riched20/para.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index 85703b5..ae2227e 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -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 */