summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2014-02-05 13:36:54 +0100
committerBram Moolenaar <bram@vim.org>2014-02-05 13:36:54 +0100
commitefa9364dcad6a2e9515e1101d0bf58fec344f5cd (patch)
tree2a03e0aa8a729eda20e8e338fb69775c7cfebbe1
parent4530e21fbea2922fccfc906dca1bd675eda69625 (diff)
downloadvim-efa9364dcad6a2e9515e1101d0bf58fec344f5cd.tar.gz
updated for version 7.4.163v7.4.163v7-4-163
Problem: MS-Windows input doesn't work properly on Windows 7 and earlier. Solution: Add a check for Windows 8. (Yasuhiro Matsumoto)
-rw-r--r--src/os_win32.c13
-rw-r--r--src/version.c2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 844b70a9..bfd5f4a2 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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
diff --git a/src/version.c b/src/version.c
index 123f6016..a6acd9a3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 163,
+/**/
162,
/**/
161,