richedit: Remove reliance on bEmulateVersion10 for end-of-line handling in ME_InternalDeleteText.
This commit is contained in:
parent
8d37388fe7
commit
fd55773680
|
@ -270,6 +270,8 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs,
|
||||||
ME_CursorFromCharOfs(editor, nOfs, &c);
|
ME_CursorFromCharOfs(editor, nOfs, &c);
|
||||||
run = &c.pRun->member.run;
|
run = &c.pRun->member.run;
|
||||||
if (run->nFlags & MERF_ENDPARA) {
|
if (run->nFlags & MERF_ENDPARA) {
|
||||||
|
int eollen = run->nCR + run->nLF;
|
||||||
|
|
||||||
if (!ME_FindItemFwd(c.pRun, diParagraph))
|
if (!ME_FindItemFwd(c.pRun, diParagraph))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -277,9 +279,7 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs,
|
||||||
ME_JoinParagraphs(editor, ME_GetParagraph(c.pRun));
|
ME_JoinParagraphs(editor, ME_GetParagraph(c.pRun));
|
||||||
/* ME_SkipAndPropagateCharOffset(p->pRun, shift); */
|
/* ME_SkipAndPropagateCharOffset(p->pRun, shift); */
|
||||||
ME_CheckCharOffsets(editor);
|
ME_CheckCharOffsets(editor);
|
||||||
nChars--;
|
nChars -= (eollen < nChars) ? eollen : nChars;
|
||||||
if (editor->bEmulateVersion10 && nChars)
|
|
||||||
nChars--;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue