Module: wine Branch: master Commit: 6b9b7b2d0bed6c2dc022238084fb35815c3722c5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6b9b7b2d0bed6c2dc02223808...
Author: Huw Davies huw@codeweavers.com Date: Wed Oct 28 08:43:52 2020 +0000
riched20: Use the paragraph from the cursor.
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/riched20/undo.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index 72e3b74f4c8..d9c5d28d6dc 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -335,13 +335,11 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, struct undo_item *undo) case undo_set_para_fmt: { ME_Cursor tmp; - ME_DisplayItem *para; cursor_from_char_ofs( editor, undo->u.set_para_fmt.pos, &tmp ); - para = ME_FindItemBack(tmp.pRun, diParagraph); - add_undo_set_para_fmt( editor, ¶->member.para ); - para->member.para.fmt = undo->u.set_para_fmt.fmt; - para->member.para.border = undo->u.set_para_fmt.border; - para_mark_rewrap( editor, ¶->member.para ); + add_undo_set_para_fmt( editor, &tmp.pPara->member.para ); + tmp.pPara->member.para.fmt = undo->u.set_para_fmt.fmt; + tmp.pPara->member.para.border = undo->u.set_para_fmt.border; + para_mark_rewrap( editor, &tmp.pPara->member.para ); break; } case undo_set_char_fmt: