Commit 8e852101 authored by Krzysztof Foltman's avatar Krzysztof Foltman Committed by Alexandre Julliard

riched20: EM_CHARFROMPOS didn't work properly with scrolling

(vertical scrollbar position was not taken into account).
parent f9b213ff
......@@ -718,6 +718,7 @@ ME_CharFromPos(ME_TextEditor *editor, int x, int y)
GetClientRect(editor->hWnd, &rc);
if (x < 0 || y < 0 || x >= rc.right || y >= rc.bottom)
return -1;
y += ME_GetYScrollPos(editor);
ME_FindPixelPos(editor, x, y, &cursor, NULL);
return (ME_GetParagraph(cursor.pRun)->member.para.nCharOfs
+ cursor.pRun->member.run.nCharOfs + cursor.nOffset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment