Skip to content

Commit 2afaaca

Browse files
committed
updated for version 7.4.163
Problem: MS-Windows input doesn't work properly on Windows 7 and earlier. Solution: Add a check for Windows 8. (Yasuhiro Matsumoto)
1 parent 433b0cb commit 2afaaca

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/os_win32.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ static int suppress_winsize = 1; /* don't fiddle with console */
232232

233233
static char_u *exe_path = NULL;
234234

235+
static BOOL win8_or_later = FALSE;
236+
235237
/*
236238
* Version of ReadConsoleInput() that works with IME.
237239
* Works around problems on Windows 8.
@@ -252,6 +254,13 @@ read_console_input(
252254
static DWORD s_dwMax = 0;
253255
DWORD dwEvents;
254256

257+
if (!win8_or_later)
258+
{
259+
if (nLength == -1)
260+
return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents);
261+
return ReadConsoleInput(hInput, lpBuffer, 1, &dwEvents);
262+
}
263+
255264
if (s_dwMax == 0)
256265
{
257266
if (nLength == -1)
@@ -617,6 +626,10 @@ PlatformId(void)
617626

618627
g_PlatformId = ovi.dwPlatformId;
619628

629+
if ((ovi.dwMajorVersion == 6 && ovi.dwMinorVersion >= 2)
630+
|| ovi.dwMajorVersion > 6)
631+
win8_or_later = TRUE;
632+
620633
#ifdef HAVE_ACL
621634
/*
622635
* Load the ADVAPI runtime if we are on anything

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
163,
741743
/**/
742744
162,
743745
/**/

0 commit comments

Comments
 (0)