richedit: Fixed check for nOffset at the end of the cursor's run.

Dylan Smith dylan.ah.smith at gmail.com
Fri Aug 14 21:23:13 CDT 2009


For some reason the code previously mixed up a selection cursor with the
result cursor.  The problem seemed to have corrected itself before as a
result of conversion between offsets and cursors, but my recent changes
made this bug more severe.
---
 dlls/riched20/caret.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
-------------- next part --------------
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 11c3f1f..096d0d5 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -890,9 +890,9 @@ static BOOL ME_ReturnFoundPos(ME_TextEditor *editor, ME_DisplayItem *found,
     rx = 0;
   result->pRun = found;
   result->nOffset = ME_CharFromPointCursor(editor, rx, &found->member.run);
-  if (editor->pCursors[0].nOffset == found->member.run.strText->nLen && rx)
+  if (result->nOffset == found->member.run.strText->nLen && rx)
   {
-    result->pRun = ME_FindItemFwd(editor->pCursors[0].pRun, diRun);
+    result->pRun = ME_FindItemFwd(result->pRun, diRun);
     result->nOffset = 0;
   }
   result->pPara = ME_GetParagraph(result->pRun);


More information about the wine-patches mailing list