riched20: Allow the cursor offset to be equal to the run length - this implies the cursor is at the end of the run, which isn't necessarily the start of the next.
This commit is contained in:
parent
e68e6ff740
commit
c5c4d54905
|
@ -884,15 +884,11 @@ static BOOL ME_FindRunInRow(ME_TextEditor *editor, ME_DisplayItem *pRow,
|
||||||
}
|
}
|
||||||
if (x >= run_x && x < run_x+width)
|
if (x >= run_x && x < run_x+width)
|
||||||
{
|
{
|
||||||
int ch = ME_CharFromPoint(editor, x-run_x, &pNext->member.run, TRUE);
|
cursor->nOffset = ME_CharFromPoint(editor, x-run_x, &pNext->member.run, TRUE);
|
||||||
if (ch < pNext->member.run.len)
|
|
||||||
{
|
|
||||||
cursor->nOffset = ch;
|
|
||||||
cursor->pRun = pNext;
|
cursor->pRun = pNext;
|
||||||
cursor->pPara = ME_GetParagraph( cursor->pRun );
|
cursor->pPara = ME_GetParagraph( cursor->pRun );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
pLastRun = pNext;
|
pLastRun = pNext;
|
||||||
pNext = ME_FindItemFwd(pNext, diRunOrStartRow);
|
pNext = ME_FindItemFwd(pNext, diRunOrStartRow);
|
||||||
} while(pNext && pNext->type == diRun);
|
} while(pNext && pNext->type == diRun);
|
||||||
|
|
Loading…
Reference in New Issue