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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui