user32: Properly update caret position after result string is committed.
This commit is contained in:
parent
e931b5d17e
commit
9ef2c648ee
|
@ -4421,10 +4421,16 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (CompFlag & GCS_RESULTSTR)
|
if (CompFlag & GCS_RESULTSTR)
|
||||||
|
{
|
||||||
EDIT_GetResultStr(hIMC, es);
|
EDIT_GetResultStr(hIMC, es);
|
||||||
|
cursor = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (CompFlag & GCS_COMPSTR)
|
if (CompFlag & GCS_COMPSTR)
|
||||||
EDIT_GetCompositionStr(hIMC, CompFlag, es);
|
EDIT_GetCompositionStr(hIMC, CompFlag, es);
|
||||||
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
|
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
|
||||||
|
}
|
||||||
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…
Reference in New Issue