[PATCH] richedit: caret.c: remove reliance on bEmulateVersion10 for end-of-line handling in ME_InternalDeleteText
Alex Villacís Lasso
alex at karlalex.palosanto.com
Sat Apr 26 15:48:24 CDT 2008
---
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 2e65426..db55695 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
--
1.5.4.1
--------------060204090407090902000501--
More information about the wine-patches
mailing list