Fixed EM_EXLINEFROMCHAR to work for last row of a paragraph.

This commit is contained in:
Phil Krylov 2005-08-23 10:02:33 +00:00 committed by Alexandre Julliard
parent e3a35a8653
commit 625d872b67
1 changed files with 4 additions and 0 deletions

View File

@ -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;