Blame SOURCES/7.4.163

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.163
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.163 (after 7.4.142)
22c937
Problem:    MS-Windows input doesn't work properly on Windows 7 and earlier.
22c937
Solution:   Add a check for Windows 8. (Yasuhiro Matsumoto)
22c937
Files:	    src/os_win32.c
22c937
22c937
22c937
*** ../vim-7.4.162/src/os_win32.c	2014-01-24 19:55:33.078220735 +0100
22c937
--- src/os_win32.c	2014-02-05 13:33:03.758078734 +0100
22c937
***************
22c937
*** 232,237 ****
22c937
--- 232,239 ----
22c937
  
22c937
  static char_u *exe_path = NULL;
22c937
  
22c937
+ static BOOL win8_or_later = FALSE;
22c937
+ 
22c937
  /*
22c937
   * Version of ReadConsoleInput() that works with IME.
22c937
   * Works around problems on Windows 8.
22c937
***************
22c937
*** 252,257 ****
22c937
--- 254,266 ----
22c937
      static DWORD s_dwMax = 0;
22c937
      DWORD dwEvents;
22c937
  
22c937
+     if (!win8_or_later)
22c937
+     {
22c937
+ 	if (nLength == -1)
22c937
+ 	    return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents);
22c937
+ 	return ReadConsoleInput(hInput, lpBuffer, 1, &dwEvents);
22c937
+     }
22c937
+ 
22c937
      if (s_dwMax == 0)
22c937
      {
22c937
  	if (nLength == -1)
22c937
***************
22c937
*** 617,622 ****
22c937
--- 626,635 ----
22c937
  
22c937
  	g_PlatformId = ovi.dwPlatformId;
22c937
  
22c937
+ 	if ((ovi.dwMajorVersion == 6 && ovi.dwMinorVersion >= 2)
22c937
+ 		|| ovi.dwMajorVersion > 6)
22c937
+ 	    win8_or_later = TRUE;
22c937
+ 
22c937
  #ifdef HAVE_ACL
22c937
  	/*
22c937
  	 * Load the ADVAPI runtime if we are on anything
22c937
*** ../vim-7.4.162/src/version.c	2014-02-05 12:36:36.622026833 +0100
22c937
--- src/version.c	2014-02-05 13:31:31.618077322 +0100
22c937
***************
22c937
*** 740,741 ****
22c937
--- 740,743 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     163,
22c937
  /**/
22c937
22c937
-- 
22c937
hundred-and-one symptoms of being an internet addict:
22c937
266. You hear most of your jokes via e-mail instead of in person.
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///