jkunstle / rpms / vim

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