0125b1d
To: vim-dev@vim.org
0125b1d
Subject: Patch 7.2.071
0125b1d
Fcc: outbox
0125b1d
From: Bram Moolenaar <Bram@moolenaar.net>
0125b1d
Mime-Version: 1.0
0125b1d
Content-Type: text/plain; charset=ISO-8859-1
0125b1d
Content-Transfer-Encoding: 8bit
0125b1d
------------
0125b1d
0125b1d
Patch 7.2.071 (extra)
0125b1d
Problem:    Win32: Handling netbeans events while Vim is busy updating the
0125b1d
	    screen may cause a crash.
0125b1d
Solution:   Like with GTK, only handle netbeans messages in the main loop.
0125b1d
	    (Xavier de Gaye)
0125b1d
Files:	    src/gui_w48.c, src/netbeans.c
0125b1d
0125b1d
0125b1d
*** ../vim-7.2.070/src/gui_w48.c	Thu Nov 20 17:09:09 2008
0125b1d
--- src/gui_w48.c	Thu Dec 11 23:47:18 2008
0125b1d
***************
0125b1d
*** 1937,1942 ****
0125b1d
--- 1937,1947 ----
0125b1d
  	    s_need_activate = FALSE;
0125b1d
  	}
0125b1d
  
0125b1d
+ #ifdef FEAT_NETBEANS_INTG
0125b1d
+ 	/* Process the queued netbeans messages. */
0125b1d
+ 	netbeans_parse_messages();
0125b1d
+ #endif
0125b1d
+ 
0125b1d
  	/*
0125b1d
  	 * Don't use gui_mch_update() because then we will spin-lock until a
0125b1d
  	 * char arrives, instead we use GetMessage() to hang until an
0125b1d
*** ../vim-7.2.070/src/netbeans.c	Fri Nov 28 21:26:50 2008
0125b1d
--- src/netbeans.c	Sun Nov 30 12:07:00 2008
0125b1d
***************
0125b1d
*** 769,779 ****
0125b1d
  	return; /* don't try to parse it */
0125b1d
      }
0125b1d
  
0125b1d
! #ifdef FEAT_GUI_GTK
0125b1d
      if (gtk_main_level() > 0)
0125b1d
  	gtk_main_quit();
0125b1d
  #else
0125b1d
!     /* Parse the messages, but avoid recursion. */
0125b1d
      if (level == 1)
0125b1d
  	netbeans_parse_messages();
0125b1d
  
0125b1d
--- 769,782 ----
0125b1d
  	return; /* don't try to parse it */
0125b1d
      }
0125b1d
  
0125b1d
! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
0125b1d
!     /* Let the main loop handle messages. */
0125b1d
! # ifdef FEAT_GUI_GTK
0125b1d
      if (gtk_main_level() > 0)
0125b1d
  	gtk_main_quit();
0125b1d
+ # endif
0125b1d
  #else
0125b1d
!     /* Parse the messages now, but avoid recursion. */
0125b1d
      if (level == 1)
0125b1d
  	netbeans_parse_messages();
0125b1d
  
0125b1d
*** ../vim-7.2.070/src/version.c	Sun Dec 21 13:02:47 2008
0125b1d
--- src/version.c	Wed Dec 24 12:18:59 2008
0125b1d
***************
0125b1d
*** 678,679 ****
0125b1d
--- 678,681 ----
0125b1d
  {   /* Add new patch number below this line */
0125b1d
+ /**/
0125b1d
+     71,
0125b1d
  /**/
0125b1d
0125b1d
-- 
0125b1d
No children may attend school with their breath smelling of "wild onions."
0125b1d
		[real standing law in West Virginia, United States of America]
0125b1d
0125b1d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
0125b1d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
0125b1d
\\\        download, build and distribute -- http://www.A-A-P.org        ///
0125b1d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///