https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36230bb214e9e24d4be99297332e697f43e4454c

commit 36230bb214e9e24d4be99297332e697f43e4454c
Author:     Stanislav Motylkov <[email protected]>
AuthorDate: Mon Mar 18 20:12:41 2019 +0300
Commit:     Hermès BÉLUSCA - MAÏTO <[email protected]>
CommitDate: Sun Mar 24 23:26:20 2019 +0100

    [USER32] Edit: Fix caret and scroll position
    
    Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-15780
---
 win32ss/user/user32/controls/edit.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/win32ss/user/user32/controls/edit.c 
b/win32ss/user/user32/controls/edit.c
index 2f2da0f4462..790c8c32bbb 100644
--- a/win32ss/user/user32/controls/edit.c
+++ b/win32ss/user/user32/controls/edit.c
@@ -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);

Reply via email to