073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.164
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.164 (after 7.4.163)
073263
Problem:    Problem with event handling on Windows 8.
073263
Solution:   Ignore duplicate WINDOW_BUFFER_SIZE_EVENTs. (Nobuhiro Takasaki)
073263
Files:	    src/os_win32.c
073263
073263
073263
*** ../vim-7.4.163/src/os_win32.c	2014-02-05 13:36:50.846082213 +0100
073263
--- src/os_win32.c	2014-02-05 14:01:13.350104623 +0100
073263
***************
073263
*** 253,258 ****
073263
--- 253,261 ----
073263
      static DWORD s_dwIndex = 0;
073263
      static DWORD s_dwMax = 0;
073263
      DWORD dwEvents;
073263
+     int head;
073263
+     int tail;
073263
+     int i;
073263
  
073263
      if (!win8_or_later)
073263
      {
073263
***************
073263
*** 274,280 ****
073263
--- 277,305 ----
073263
  	    *lpEvents = 0;
073263
  	    return TRUE;
073263
  	}
073263
+ 
073263
+ 	if (s_dwMax > 1)
073263
+ 	{
073263
+ 	    head = 0;
073263
+ 	    tail = s_dwMax - 1;
073263
+ 	    while (head != tail)
073263
+ 	    {
073263
+ 		if (s_irCache[head].EventType == WINDOW_BUFFER_SIZE_EVENT
073263
+ 			&& s_irCache[head + 1].EventType
073263
+ 						  == WINDOW_BUFFER_SIZE_EVENT)
073263
+ 		{
073263
+ 		    /* Remove duplicate event to avoid flicker. */
073263
+ 		    for (i = head; i < tail; ++i)
073263
+ 			s_irCache[i] = s_irCache[i + 1];
073263
+ 		    --tail;
073263
+ 		    continue;
073263
+ 		}
073263
+ 		head++;
073263
+ 	    }
073263
+ 	    s_dwMax = tail + 1;
073263
+ 	}
073263
      }
073263
+ 
073263
      *lpBuffer = s_irCache[s_dwIndex];
073263
      if (nLength != -1 && ++s_dwIndex >= s_dwMax)
073263
  	s_dwMax = 0;
073263
*** ../vim-7.4.163/src/version.c	2014-02-05 13:36:50.850082213 +0100
073263
--- src/version.c	2014-02-05 13:54:15.570098222 +0100
073263
***************
073263
*** 740,741 ****
073263
--- 740,743 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     164,
073263
  /**/
073263
073263
-- 
073263
XML is a nice language for computers.  Not for humans.
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    ///