https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cd7011388e10f2ad6f4ea…
commit cd7011388e10f2ad6f4eac9c418223437d0a7884
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Mon Mar 18 20:10:10 2019 +0300
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Mar 24 23:26:20 2019 +0100
[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);