mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +00:00
[COMCTL32][USER32] EDIT: Fix caret position for IME
CORE-11700
This commit is contained in:
parent
5ff0ef403e
commit
8f2c2c1def
2 changed files with 8 additions and 0 deletions
|
@ -4392,7 +4392,11 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
|
||||||
{
|
{
|
||||||
if (CompFlag & GCS_COMPSTR)
|
if (CompFlag & GCS_COMPSTR)
|
||||||
EDIT_GetCompositionStr(hIMC, CompFlag, es);
|
EDIT_GetCompositionStr(hIMC, CompFlag, es);
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
cursor = 0;
|
||||||
|
#else
|
||||||
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
|
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
ImmReleaseContext(hwnd, hIMC);
|
ImmReleaseContext(hwnd, hIMC);
|
||||||
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);
|
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);
|
||||||
|
|
|
@ -4617,7 +4617,11 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
|
||||||
{
|
{
|
||||||
if (CompFlag & GCS_COMPSTR)
|
if (CompFlag & GCS_COMPSTR)
|
||||||
EDIT_GetCompositionStr(hIMC, CompFlag, es);
|
EDIT_GetCompositionStr(hIMC, CompFlag, es);
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
cursor = 0;
|
||||||
|
#else
|
||||||
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
|
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
ImmReleaseContext(hwnd, hIMC);
|
ImmReleaseContext(hwnd, hIMC);
|
||||||
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);
|
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue