richedit: Fixed check for nOffset at the end of the cursor's run.

For some reason the code previously mixed up a selection cursor with the
result cursor.  The problem seemed to have corrected itself before as a
result of conversion between offsets and cursors, but my recent changes
made this bug more severe.
This commit is contained in:
Dylan Smith 2009-08-14 22:23:13 -04:00 committed by Alexandre Julliard
parent ad1d8adfeb
commit a8e58307f9
1 changed files with 2 additions and 2 deletions

View File

@ -890,9 +890,9 @@ static BOOL ME_ReturnFoundPos(ME_TextEditor *editor, ME_DisplayItem *found,
rx = 0;
result->pRun = found;
result->nOffset = ME_CharFromPointCursor(editor, rx, &found->member.run);
if (editor->pCursors[0].nOffset == found->member.run.strText->nLen && rx)
if (result->nOffset == found->member.run.strText->nLen && rx)
{
result->pRun = ME_FindItemFwd(editor->pCursors[0].pRun, diRun);
result->pRun = ME_FindItemFwd(result->pRun, diRun);
result->nOffset = 0;
}
result->pPara = ME_GetParagraph(result->pRun);