[COMCTL32] 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:10:10 +03:00 committed by Hermès BÉLUSCA - MAÏTO
parent 048c8c1605
commit cd7011388e

View file

@ -1050,7 +1050,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);