0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.4.164

Problem:    Problem with event handling on Windows 8.
Solution:   Ignore duplicate WINDOW_BUFFER_SIZE_EVENTs. (Nobuhiro Takasaki)
This commit is contained in:
Bram Moolenaar
2014-02-05 14:02:27 +01:00
parent f50eb7882e
commit dd415a6c5a
2 changed files with 27 additions and 0 deletions

View File

@@ -253,6 +253,9 @@ read_console_input(
static DWORD s_dwIndex = 0; static DWORD s_dwIndex = 0;
static DWORD s_dwMax = 0; static DWORD s_dwMax = 0;
DWORD dwEvents; DWORD dwEvents;
int head;
int tail;
int i;
if (!win8_or_later) if (!win8_or_later)
{ {
@@ -274,7 +277,29 @@ read_console_input(
*lpEvents = 0; *lpEvents = 0;
return TRUE; return TRUE;
} }
if (s_dwMax > 1)
{
head = 0;
tail = s_dwMax - 1;
while (head != tail)
{
if (s_irCache[head].EventType == WINDOW_BUFFER_SIZE_EVENT
&& s_irCache[head + 1].EventType
== WINDOW_BUFFER_SIZE_EVENT)
{
/* Remove duplicate event to avoid flicker. */
for (i = head; i < tail; ++i)
s_irCache[i] = s_irCache[i + 1];
--tail;
continue;
}
head++;
}
s_dwMax = tail + 1;
}
} }
*lpBuffer = s_irCache[s_dwIndex]; *lpBuffer = s_irCache[s_dwIndex];
if (nLength != -1 && ++s_dwIndex >= s_dwMax) if (nLength != -1 && ++s_dwIndex >= s_dwMax)
s_dwMax = 0; s_dwMax = 0;

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
164,
/**/ /**/
163, 163,
/**/ /**/