mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +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 0707475f69
CORE-19731
This commit is contained in:
parent
a509941786
commit
bc76250bd8
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue