mirror of
https://github.com/reactos/wine.git
synced 2025-02-13 08:44:54 +00:00
Fixed EOL detection in ME_RunOfsFromCharOfs in 1.0 emulation mode
(necessary for a non-workaround version of EM_POSFROMCHAR).
This commit is contained in:
parent
b82d94e4f1
commit
24a0f15b29
@ -145,6 +145,7 @@ void ME_RunOfsFromCharOfs(ME_TextEditor *editor, int nCharOfs, ME_DisplayItem **
|
|||||||
|
|
||||||
if (nCharOfs < pPara->member.para.next_para->member.para.nCharOfs)
|
if (nCharOfs < pPara->member.para.next_para->member.para.nCharOfs)
|
||||||
{
|
{
|
||||||
|
int eollen = 1;
|
||||||
*ppRun = ME_FindItemFwd(pPara, diRun);
|
*ppRun = ME_FindItemFwd(pPara, diRun);
|
||||||
assert(*ppRun);
|
assert(*ppRun);
|
||||||
while (!((*ppRun)->member.run.nFlags & MERF_ENDPARA))
|
while (!((*ppRun)->member.run.nFlags & MERF_ENDPARA))
|
||||||
@ -159,7 +160,10 @@ void ME_RunOfsFromCharOfs(ME_TextEditor *editor, int nCharOfs, ME_DisplayItem **
|
|||||||
}
|
}
|
||||||
*ppRun = pNext;
|
*ppRun = pNext;
|
||||||
}
|
}
|
||||||
if (nCharOfs == nParaOfs + (*ppRun)->member.run.nCharOfs) {
|
/* the handling of bEmulateVersion10 may be a source of many bugs, I'm afraid */
|
||||||
|
eollen = (editor->bEmulateVersion10 ? 2 : 1);
|
||||||
|
if (nCharOfs >= nParaOfs + (*ppRun)->member.run.nCharOfs &&
|
||||||
|
nCharOfs < nParaOfs + (*ppRun)->member.run.nCharOfs + eollen) {
|
||||||
*pOfs = 0;
|
*pOfs = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user