summaryrefslogblamecommitdiffstats
path: root/patches/source/vim/patches/7.4.164
blob: b35debadf61f091a56d1cdc2bac5ad471cff3225 (plain) (tree)













































































                                                                              
To: vim_dev@googlegroups.com
Subject: Patch 7.4.164
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.164 (after 7.4.163)
Problem:    Problem with event handling on Windows 8.
Solution:   Ignore duplicate WINDOW_BUFFER_SIZE_EVENTs. (Nobuhiro Takasaki)
Files:	    src/os_win32.c


*** ../vim-7.4.163/src/os_win32.c	2014-02-05 13:36:50.846082213 +0100
--- src/os_win32.c	2014-02-05 14:01:13.350104623 +0100
***************
*** 253,258 ****
--- 253,261 ----
      static DWORD s_dwIndex = 0;
      static DWORD s_dwMax = 0;
      DWORD dwEvents;
+     int head;
+     int tail;
+     int i;
  
      if (!win8_or_later)
      {
***************
*** 274,280 ****
--- 277,305 ----
  	    *lpEvents = 0;
  	    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];
      if (nLength != -1 && ++s_dwIndex >= s_dwMax)
  	s_dwMax = 0;
*** ../vim-7.4.163/src/version.c	2014-02-05 13:36:50.850082213 +0100
--- src/version.c	2014-02-05 13:54:15.570098222 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     164,
  /**/

-- 
XML is a nice language for computers.  Not for humans.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///