[USER32] Edit: Fix caret and scroll position

Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-15780
This commit is contained in:
Stanislav Motylkov 2019-03-18 20:12:41 +03:00 committed by Hermès BÉLUSCA - MAÏTO
parent cd7011388e
commit 36230bb214

View file

@ -1135,7 +1135,11 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
x -= es->x_offset;
}
else
#ifdef __REACTOS__ /* CORE-15780 */
x = (lw > 0 ? es->x_offset : x - es->x_offset);
#else
x = es->x_offset;
#endif
if (es->style & ES_RIGHT)
x = w - (lw - x);