mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[COMCTL32] Fix edit control cursor positioning (#7317)
Fix caret positioning regression from Wine Sync to Wine 5.0 affecting notepad. Restore older Wine code that handles caret position with ReactOS better. This was a regression from 0.4.15-dev-8612-g0707475 https://github.com/reactos/reactos/commit/0707475f6974a0add99fc396146c26a970c5148b CORE-19731
This commit is contained in:
@@ -1050,7 +1050,15 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
|
||||
lw = line_def->width;
|
||||
w = es->format_rect.right - es->format_rect.left;
|
||||
if (line_def->ssa)
|
||||
#ifdef __REACTOS__ /* CORE-19731 & match win32ss/user/user32/controls/edit.c */
|
||||
{
|
||||
ScriptStringCPtoX(line_def->ssa, (index - 1) - li, TRUE, &x);
|
||||
x -= es->x_offset;
|
||||
}
|
||||
else
|
||||
#else
|
||||
ScriptStringCPtoX(line_def->ssa, (index - 1) - li, TRUE, &x);
|
||||
#endif
|
||||
#ifdef __REACTOS__ /* CORE-15780 */
|
||||
x = (lw > 0 ? es->x_offset : x - es->x_offset);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user