From 625d872b6789caa22b5a2f92b8cc0dfda2820c30 Mon Sep 17 00:00:00 2001 From: Phil Krylov Date: Tue, 23 Aug 2005 10:02:33 +0000 Subject: [PATCH] Fixed EM_EXLINEFROMCHAR to work for last row of a paragraph. --- dlls/riched20/row.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index b803ed21302..d7a6bd158e2 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -116,10 +116,14 @@ ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) } if (item) { + ME_DisplayItem *next_para = item->member.para.next_para; + nOfs -= item->member.para.nCharOfs; item = ME_FindItemFwd(item, diRun); while ((item = ME_FindItemFwd(item, diStartRowOrParagraph)) != NULL) { + if (item == next_para) + break; item = ME_FindItemFwd(item, diRun); if (item->member.run.nCharOfs > nOfs) break;