user32: Properly update caret position after result string is committed.

This commit is contained in:
Qian Hong 2013-07-03 03:54:41 +08:00 committed by Alexandre Julliard
parent e931b5d17e
commit 9ef2c648ee
1 changed files with 9 additions and 3 deletions

View File

@ -4421,10 +4421,16 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
return;
if (CompFlag & GCS_RESULTSTR)
{
EDIT_GetResultStr(hIMC, es);
if (CompFlag & GCS_COMPSTR)
EDIT_GetCompositionStr(hIMC, CompFlag, es);
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
cursor = 0;
}
else
{
if (CompFlag & GCS_COMPSTR)
EDIT_GetCompositionStr(hIMC, CompFlag, es);
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
}
ImmReleaseContext(hwnd, hIMC);
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP);
}