riched20: Use the paragraph from the cursor.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2020-10-28 08:43:52 +00:00 committed by Alexandre Julliard
parent f9a82574c9
commit 6b9b7b2d0b
1 changed files with 4 additions and 6 deletions

View File

@ -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, &para->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, &para->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: