Karsten Hopp c1ac16
To: vim_dev@googlegroups.com
Karsten Hopp c1ac16
Subject: Patch 7.4.164
Karsten Hopp c1ac16
Fcc: outbox
Karsten Hopp c1ac16
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp c1ac16
Mime-Version: 1.0
Karsten Hopp c1ac16
Content-Type: text/plain; charset=UTF-8
Karsten Hopp c1ac16
Content-Transfer-Encoding: 8bit
Karsten Hopp c1ac16
------------
Karsten Hopp c1ac16
Karsten Hopp c1ac16
Patch 7.4.164 (after 7.4.163)
Karsten Hopp c1ac16
Problem:    Problem with event handling on Windows 8.
Karsten Hopp c1ac16
Solution:   Ignore duplicate WINDOW_BUFFER_SIZE_EVENTs. (Nobuhiro Takasaki)
Karsten Hopp c1ac16
Files:	    src/os_win32.c
Karsten Hopp c1ac16
Karsten Hopp c1ac16
Karsten Hopp c1ac16
*** ../vim-7.4.163/src/os_win32.c	2014-02-05 13:36:50.846082213 +0100
Karsten Hopp c1ac16
--- src/os_win32.c	2014-02-05 14:01:13.350104623 +0100
Karsten Hopp c1ac16
***************
Karsten Hopp c1ac16
*** 253,258 ****
Karsten Hopp c1ac16
--- 253,261 ----
Karsten Hopp c1ac16
      static DWORD s_dwIndex = 0;
Karsten Hopp c1ac16
      static DWORD s_dwMax = 0;
Karsten Hopp c1ac16
      DWORD dwEvents;
Karsten Hopp c1ac16
+     int head;
Karsten Hopp c1ac16
+     int tail;
Karsten Hopp c1ac16
+     int i;
Karsten Hopp c1ac16
  
Karsten Hopp c1ac16
      if (!win8_or_later)
Karsten Hopp c1ac16
      {
Karsten Hopp c1ac16
***************
Karsten Hopp c1ac16
*** 274,280 ****
Karsten Hopp c1ac16
--- 277,305 ----
Karsten Hopp c1ac16
  	    *lpEvents = 0;
Karsten Hopp c1ac16
  	    return TRUE;
Karsten Hopp c1ac16
  	}
Karsten Hopp c1ac16
+ 
Karsten Hopp c1ac16
+ 	if (s_dwMax > 1)
Karsten Hopp c1ac16
+ 	{
Karsten Hopp c1ac16
+ 	    head = 0;
Karsten Hopp c1ac16
+ 	    tail = s_dwMax - 1;
Karsten Hopp c1ac16
+ 	    while (head != tail)
Karsten Hopp c1ac16
+ 	    {
Karsten Hopp c1ac16
+ 		if (s_irCache[head].EventType == WINDOW_BUFFER_SIZE_EVENT
Karsten Hopp c1ac16
+ 			&& s_irCache[head + 1].EventType
Karsten Hopp c1ac16
+ 						  == WINDOW_BUFFER_SIZE_EVENT)
Karsten Hopp c1ac16
+ 		{
Karsten Hopp c1ac16
+ 		    /* Remove duplicate event to avoid flicker. */
Karsten Hopp c1ac16
+ 		    for (i = head; i < tail; ++i)
Karsten Hopp c1ac16
+ 			s_irCache[i] = s_irCache[i + 1];
Karsten Hopp c1ac16
+ 		    --tail;
Karsten Hopp c1ac16
+ 		    continue;
Karsten Hopp c1ac16
+ 		}
Karsten Hopp c1ac16
+ 		head++;
Karsten Hopp c1ac16
+ 	    }
Karsten Hopp c1ac16
+ 	    s_dwMax = tail + 1;
Karsten Hopp c1ac16
+ 	}
Karsten Hopp c1ac16
      }
Karsten Hopp c1ac16
+ 
Karsten Hopp c1ac16
      *lpBuffer = s_irCache[s_dwIndex];
Karsten Hopp c1ac16
      if (nLength != -1 && ++s_dwIndex >= s_dwMax)
Karsten Hopp c1ac16
  	s_dwMax = 0;
Karsten Hopp c1ac16
*** ../vim-7.4.163/src/version.c	2014-02-05 13:36:50.850082213 +0100
Karsten Hopp c1ac16
--- src/version.c	2014-02-05 13:54:15.570098222 +0100
Karsten Hopp c1ac16
***************
Karsten Hopp c1ac16
*** 740,741 ****
Karsten Hopp c1ac16
--- 740,743 ----
Karsten Hopp c1ac16
  {   /* Add new patch number below this line */
Karsten Hopp c1ac16
+ /**/
Karsten Hopp c1ac16
+     164,
Karsten Hopp c1ac16
  /**/
Karsten Hopp c1ac16
Karsten Hopp c1ac16
-- 
Karsten Hopp c1ac16
XML is a nice language for computers.  Not for humans.
Karsten Hopp c1ac16
Karsten Hopp c1ac16
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp c1ac16
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp c1ac16
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp c1ac16
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///