Commit 8a4fe8e6 authored by Byeong-Sik Jeon's avatar Byeong-Sik Jeon Committed by Alexandre Julliard

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

parent 6fa6cc7e
......@@ -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,7 +5349,8 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
return;
}
ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen);
if (dwBufLen)
ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen);
lpCompStr[dwBufLen/sizeof(WCHAR)] = 0;
if (CompFlag & GCS_COMPATTR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment