Karsten Hopp 122bba
To: vim_dev@googlegroups.com
Karsten Hopp 122bba
Subject: Patch 7.4.666
Karsten Hopp 122bba
Fcc: outbox
Karsten Hopp 122bba
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 122bba
Mime-Version: 1.0
Karsten Hopp 122bba
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 122bba
Content-Transfer-Encoding: 8bit
Karsten Hopp 122bba
------------
Karsten Hopp 122bba
Karsten Hopp 122bba
Patch 7.4.666
Karsten Hopp 122bba
Problem:    There is a chance that Vim may lock up.
Karsten Hopp 122bba
Solution:   Handle timer events differently. (Aaron Burrow)
Karsten Hopp 122bba
Files:	    src/os_unix.c
Karsten Hopp 122bba
Karsten Hopp 122bba
Karsten Hopp 122bba
*** ../vim-7.4.665/src/os_unix.c	2014-12-17 17:59:26.912631374 +0100
Karsten Hopp 122bba
--- src/os_unix.c	2015-03-20 16:21:43.269619610 +0100
Karsten Hopp 122bba
***************
Karsten Hopp 122bba
*** 7096,7114 ****
Karsten Hopp 122bba
  {
Karsten Hopp 122bba
      XEvent event;
Karsten Hopp 122bba
  
Karsten Hopp 122bba
!     while (XtAppPending(app_context) && !vim_is_input_buf_full())
Karsten Hopp 122bba
      {
Karsten Hopp 122bba
! 	XtAppNextEvent(app_context, &event);
Karsten Hopp 122bba
! #ifdef FEAT_CLIENTSERVER
Karsten Hopp 122bba
  	{
Karsten Hopp 122bba
! 	    XPropertyEvent *e = (XPropertyEvent *)&event;
Karsten Hopp 122bba
  
Karsten Hopp 122bba
! 	    if (e->type == PropertyNotify && e->window == commWindow
Karsten Hopp 122bba
  		   && e->atom == commProperty && e->state == PropertyNewValue)
Karsten Hopp 122bba
! 		serverEventProc(xterm_dpy, &event);
Karsten Hopp 122bba
! 	}
Karsten Hopp 122bba
  #endif
Karsten Hopp 122bba
! 	XtDispatchEvent(&event);
Karsten Hopp 122bba
      }
Karsten Hopp 122bba
  }
Karsten Hopp 122bba
  
Karsten Hopp 122bba
--- 7096,7128 ----
Karsten Hopp 122bba
  {
Karsten Hopp 122bba
      XEvent event;
Karsten Hopp 122bba
  
Karsten Hopp 122bba
!     for (;;)
Karsten Hopp 122bba
      {
Karsten Hopp 122bba
!         XtInputMask mask = XtAppPending(app_context);
Karsten Hopp 122bba
! 
Karsten Hopp 122bba
!         if (mask == 0 || vim_is_input_buf_full())
Karsten Hopp 122bba
! 	    break;
Karsten Hopp 122bba
! 
Karsten Hopp 122bba
!         if (mask & XtIMXEvent)
Karsten Hopp 122bba
  	{
Karsten Hopp 122bba
! 	    /* There is an event to process. */
Karsten Hopp 122bba
!             XtAppNextEvent(app_context, &event);
Karsten Hopp 122bba
! #ifdef FEAT_CLIENTSERVER
Karsten Hopp 122bba
! 	    {
Karsten Hopp 122bba
! 		XPropertyEvent *e = (XPropertyEvent *)&event;
Karsten Hopp 122bba
  
Karsten Hopp 122bba
! 		if (e->type == PropertyNotify && e->window == commWindow
Karsten Hopp 122bba
  		   && e->atom == commProperty && e->state == PropertyNewValue)
Karsten Hopp 122bba
!                 serverEventProc(xterm_dpy, &event);
Karsten Hopp 122bba
! 	    }
Karsten Hopp 122bba
  #endif
Karsten Hopp 122bba
!             XtDispatchEvent(&event);
Karsten Hopp 122bba
!         }
Karsten Hopp 122bba
! 	else
Karsten Hopp 122bba
! 	{
Karsten Hopp 122bba
! 	    /* There is something else than an event to process. */
Karsten Hopp 122bba
!             XtAppProcessEvent(app_context, mask);
Karsten Hopp 122bba
!         }
Karsten Hopp 122bba
      }
Karsten Hopp 122bba
  }
Karsten Hopp 122bba
  
Karsten Hopp 122bba
*** ../vim-7.4.665/src/version.c	2015-03-20 15:58:47.417117245 +0100
Karsten Hopp 122bba
--- src/version.c	2015-03-20 16:07:37.499149050 +0100
Karsten Hopp 122bba
***************
Karsten Hopp 122bba
*** 743,744 ****
Karsten Hopp 122bba
--- 743,746 ----
Karsten Hopp 122bba
  {   /* Add new patch number below this line */
Karsten Hopp 122bba
+ /**/
Karsten Hopp 122bba
+     666,
Karsten Hopp 122bba
  /**/
Karsten Hopp 122bba
Karsten Hopp 122bba
-- 
Karsten Hopp 122bba
Q:   How many hardware engineers does it take to change a lightbulb?
Karsten Hopp 122bba
A:   None.  We'll fix it in software.
Karsten Hopp 122bba
Karsten Hopp 122bba
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 122bba
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 122bba
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 122bba
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///