Module: wine Branch: master Commit: 887d7e686de8a76be87b959a3d6ae5d71707deb9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=887d7e686de8a76be87b959a3...
Author: Huw Davies huw@codeweavers.com Date: Wed Oct 21 10:05:52 2020 +0100
riched20: Use the paragraph and run helpers in the delete text function.
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/riched20/caret.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index eb7ad7f1899..21dd901088e 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -333,18 +333,18 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, { /* We aren't deleting anything in this run, so we will go back to the * last run we are deleting text in. */ - ME_PrevRun(&c.pPara, &c.pRun, TRUE); + c.pRun = run_get_di( run_prev_all_paras( &c.pRun->member.run ) ); + c.pPara = para_get_di( c.pRun->member.run.para ); c.nOffset = c.pRun->member.run.len; } run = &c.pRun->member.run; - if (run->nFlags & MERF_ENDPARA) { + if (run->nFlags & MERF_ENDPARA) + { int eollen = c.pRun->member.run.len; BOOL keepFirstParaFormat;
- if (!ME_FindItemFwd(c.pRun, diParagraph)) - { - return TRUE; - } + if (!para_next( para_next( &c.pPara->member.para ) )) return TRUE; + keepFirstParaFormat = (totalChars == nChars && nChars <= eollen && run->nCharOfs); if (!editor->bEmulateVersion10) /* v4.1 */