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