user32: Update the edit control when the IME composition string is emptied.

This commit is contained in:
Byeong-Sik Jeon 2006-11-15 15:52:31 +09:00 committed by Alexandre Julliard
parent 6fa6cc7e83
commit 8a4fe8e6e4
1 changed files with 3 additions and 2 deletions

View File

@ -5335,7 +5335,7 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
dwBufLen = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0);
if (dwBufLen <= 0)
if (dwBufLen < 0)
{
ImmReleaseContext(hwnd, hIMC);
return;
@ -5349,6 +5349,7 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
return;
}
if (dwBufLen)
ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen);
lpCompStr[dwBufLen/sizeof(WCHAR)] = 0;