Module: wine Branch: master Commit: 9ef2c648ee557d25d2598a42fdc7854101709f00 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ef2c648ee557d25d2598a42fd...
Author: Qian Hong qhong@codeweavers.com Date: Wed Jul 3 03:54:41 2013 +0800
user32: Properly update caret position after result string is committed.
---
dlls/user32/edit.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 3e5a850..3634710 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -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); }