On Mon, Aug 9, 2010 at 12:02 AM, Lech Lorens wrote:
> I just tried using Vim with Pyclewn. According to :help netbeans.txt,
> the NetBeans interface is supported in some GUI variants and in console
> Vim. I get:
>
> $ pyclewn -e vim
> Vim: Caught deadly signal SEGV
> Vim: Finished
>


I can reproduce it when vim is compiled with FEAT_GUI_MOTIF
(CONF_OPT_GUI = --disable-gtk2-check in the Makefile, on a lenny debian
system) and vim is run in a terminal.

The attached patch against 06a44c4eb3e5 changeset, fixes the bug.

The pyclewn test suite has been run successfully with this patch, and:
  * vim compiled with FEAT_GUI_MOTIF, and vim is run in a terminal
  * vim compiled with FEAT_GUI_MOTIF, and using gvim
  * vim compiled with FEAT_GUI_GTK, and vim is run in a terminal
  * vim compiled with FEAT_GUI_GTK, and using gvim


Xavier

-- 
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
diff --git a/src/netbeans.c b/src/netbeans.c
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -185,8 +185,11 @@
     setcursor();
     out_flush();
 #ifdef FEAT_GUI
-    gui_update_cursor(TRUE, FALSE);
-    gui_mch_flush();
+    if (NB_HAS_GUI)
+    {
+        gui_update_cursor(TRUE, FALSE);
+        gui_mch_flush();
+    }
 #endif
 }
 
@@ -2101,9 +2104,12 @@
 		dosetvisible = FALSE;
 
 #ifdef FEAT_GUI
-		/* Side effect!!!. */
-		if (!gui.starting)
-		    gui_mch_set_foreground();
+                if (NB_HAS_GUI)
+                {
+                    /* Side effect!!!. */
+                    if (!gui.starting)
+                        gui_mch_set_foreground();
+                }
 #endif
 	    }
 /* =====================================================================*/
@@ -2111,9 +2117,12 @@
 	else if (streq((char *)cmd, "raise"))
 	{
 #ifdef FEAT_GUI
-	    /* Bring gvim to the foreground. */
-	    if (!gui.starting)
-		gui_mch_set_foreground();
+            if (NB_HAS_GUI)
+            {
+                /* Bring gvim to the foreground. */
+                if (!gui.starting)
+                    gui_mch_set_foreground();
+            }
 #endif
 /* =====================================================================*/
 	}
@@ -2246,8 +2255,11 @@
 	    setcursor();
 	    out_flush();
 #ifdef FEAT_GUI
-	    gui_update_cursor(TRUE, FALSE);
-	    gui_mch_flush();
+            if (NB_HAS_GUI)
+            {
+                gui_update_cursor(TRUE, FALSE);
+                gui_mch_flush();
+            }
 #endif
 	    /* Quit a hit-return or more prompt. */
 	    if (State == HITRETURN || State == ASKMORE)
@@ -2637,8 +2649,11 @@
 	setcursor();
 	out_flush();
 #ifdef FEAT_GUI
-	gui_update_cursor(TRUE, FALSE);
-	gui_mch_flush();
+        if (NB_HAS_GUI)
+        {
+            gui_update_cursor(TRUE, FALSE);
+            gui_mch_flush();
+        }
 #endif
 	/* Quit a hit-return or more prompt. */
 	if (State == HITRETURN || State == ASKMORE)
@@ -2689,8 +2704,11 @@
     out_flush();		/* make sure output has been written */
 
 #ifdef FEAT_GUI
-    gui_update_cursor(TRUE, FALSE);
-    gui_mch_flush();
+    if (NB_HAS_GUI)
+    {
+        gui_update_cursor(TRUE, FALSE);
+        gui_mch_flush();
+    }
 #endif
 }
 
@@ -2987,8 +3005,11 @@
     setcursor();
     out_flush();
 #ifdef FEAT_GUI
-    gui_update_cursor(TRUE, FALSE);
-    gui_mch_flush();
+    if (NB_HAS_GUI)
+    {
+        gui_update_cursor(TRUE, FALSE);
+        gui_mch_flush();
+    }
 #endif
 }
 

Raspunde prin e-mail lui