[COMCTL32][USER32] EDIT: Fix caret position for IME

CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2023-04-10 08:27:50 +09:00
parent 5ff0ef403e
commit 8f2c2c1def
2 changed files with 8 additions and 0 deletions

View file

@ -4392,7 +4392,11 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
{
if (CompFlag & GCS_COMPSTR)
EDIT_GetCompositionStr(hIMC, CompFlag, es);
#ifdef __REACTOS__
cursor = 0;
#else
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
#endif
}
ImmReleaseContext(hwnd, hIMC);
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);

View file

@ -4617,7 +4617,11 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
{
if (CompFlag & GCS_COMPSTR)
EDIT_GetCompositionStr(hIMC, CompFlag, es);
#ifdef __REACTOS__
cursor = 0;
#else
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
#endif
}
ImmReleaseContext(hwnd, hIMC);
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);