Module: wine Branch: master Commit: fd557736806050d195991b6540aa3970a0d88f14 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd557736806050d195991b6540...
Author: Alex Villacís Lasso a_villacis@palosanto.com Date: Sat Apr 26 15:48:24 2008 -0500
richedit: Remove reliance on bEmulateVersion10 for end-of-line handling in ME_InternalDeleteText.
---
dlls/riched20/caret.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 2153092..56cd2b1 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -270,6 +270,8 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, ME_CursorFromCharOfs(editor, nOfs, &c); run = &c.pRun->member.run; if (run->nFlags & MERF_ENDPARA) { + int eollen = run->nCR + run->nLF; + if (!ME_FindItemFwd(c.pRun, diParagraph)) { return; @@ -277,9 +279,7 @@ void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, ME_JoinParagraphs(editor, ME_GetParagraph(c.pRun)); /* ME_SkipAndPropagateCharOffset(p->pRun, shift); */ ME_CheckCharOffsets(editor); - nChars--; - if (editor->bEmulateVersion10 && nChars) - nChars--; + nChars -= (eollen < nChars) ? eollen : nChars; continue; } else