diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-08-10 17:08:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-08-10 17:08:03 +0200 |
commit | 8c85fa3b2659a01fc1462ea26140ad2d0622e5b0 (patch) | |
tree | 569a36665fef6bf623fdfe92ac17cf1c3d273518 /src/os_win32.c | |
parent | cf839732113e19a53302331d4f479a5e844a4a67 (diff) | |
download | vim-8c85fa3b2659a01fc1462ea26140ad2d0622e5b0.zip |
updated for version 7.3.277
Problem: MS-Windows: some characters do not show in dialogs.
Solution: Use the wide methods when available. (Yanwei Jia)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index 88ead6fd6..0d8bbf7d3 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -152,6 +152,14 @@ static PFNGCKLN s_pfnGetConsoleKeyboardLayoutName = NULL; # define wcsicmp(a, b) wcscmpi((a), (b)) #endif +/* Enable common dialogs input unicode from IME if posible. */ +#ifdef FEAT_MBYTE +LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage; +BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage; +BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage; +BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage; +#endif + #ifndef FEAT_GUI_W32 /* Win32 Console handles for input and output */ static HANDLE g_hConIn = INVALID_HANDLE_VALUE; @@ -3284,10 +3292,10 @@ mch_system_classic(char *cmd, int options) { MSG msg; - if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); - DispatchMessage(&msg); + pDispatchMessage(&msg); } if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) break; |