From cd7011388e10f2ad6f4eac9c418223437d0a7884 Mon Sep 17 00:00:00 2001 From: Stanislav Motylkov Date: Mon, 18 Mar 2019 20:10:10 +0300 Subject: [PATCH] [COMCTL32] Edit: Fix caret and scroll position Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-15780 --- dll/win32/comctl32/edit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c index 11d1b1852ce..a6a04fe330a 100644 --- a/dll/win32/comctl32/edit.c +++ b/dll/win32/comctl32/edit.c @@ -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);