Last active
January 4, 2016 18:59
-
-
Save mattn/8664740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 89b3a7ef9622 src/os_win32.c | |
--- a/src/os_win32.c Thu Jan 23 22:45:58 2014 +0100 | |
+++ b/src/os_win32.c Tue Jan 28 20:15:21 2014 +0900 | |
@@ -232,6 +232,8 @@ | |
static char_u *exe_path = NULL; | |
+static BOOL win8_or_later = FALSE; | |
+ | |
/* | |
* Version of ReadConsoleInput() that works with IME. | |
* Works around problems on Windows 8. | |
@@ -252,6 +254,11 @@ | |
static DWORD s_dwMax = 0; | |
DWORD dwEvents; | |
+ if (!win8_or_later) { | |
+ if (nLength == -1) | |
+ return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents); | |
+ return ReadConsoleInput(hInput, lpBuffer, 1, &dwEvents); | |
+ } | |
if (s_dwMax == 0) | |
{ | |
if (nLength == -1) | |
@@ -617,6 +624,10 @@ | |
g_PlatformId = ovi.dwPlatformId; | |
+ if((ovi.dwMajorVersion == 6 && ovi.dwMinorVersion >= 2) || | |
+ ovi.dwMajorVersion > 6) | |
+ win8_or_later = TRUE; | |
+ | |
#ifdef HAVE_ACL | |
/* | |
* Load the ADVAPI runtime if we are on anything |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment