Dylan Smith : richedit: Fixed check for nOffset at the end of the cursor' s run.
Alexandre Julliard
julliard at winehq.org
Mon Aug 17 11:23:52 CDT 2009
Module: wine
Branch: master
Commit: a8e58307f91aa4515cf0d4bebb2d875b95e22bc8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a8e58307f91aa4515cf0d4bebb2d875b95e22bc8
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Fri Aug 14 22:23:13 2009 -0400
richedit: Fixed check for nOffset at the end of the cursor's run.
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(-)
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-cvs
mailing list