]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.163 v7.4.163
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Feb 2014 12:36:54 +0000 (13:36 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Feb 2014 12:36:54 +0000 (13:36 +0100)
Problem:    MS-Windows input doesn't work properly on Windows 7 and earlier.
Solution:   Add a check for Windows 8. (Yasuhiro Matsumoto)

src/os_win32.c
src/version.c

index 844b70a974dad245665476a869e53602688314ee..bfd5f4a2edafd4e1ffc9ec509de00b0b72d9e79c 100644 (file)
@@ -232,6 +232,8 @@ static int suppress_winsize = 1;    /* don't fiddle with console */
 
 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,13 @@ read_console_input(
     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 +626,10 @@ PlatformId(void)
 
        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
index 123f60169cca1d00eac8e2fa9265f67473c6cae5..a6acd9a3685ee5ec13c62810ffee5d8824d3836a 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    163,
 /**/
     162,
 /**/