Add :nbstart and :nbclose.
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 522f923..8b37272 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -710,7 +710,7 @@
     }
 #endif
 #if defined(FEAT_NETBEANS_INTG) && defined(FEAT_GUI_MOTIF)
-    if (usingNetbeans)
+    if (netbeans_active())
     {
 	XRectangle  rec;
 
@@ -1253,7 +1253,6 @@
 #ifdef FEAT_NETBEANS_INTG
 	    if (strncmp("-nb", argv[arg], 3) == 0)
 	{
-	    usingNetbeans++;
 	    gui.dofork = FALSE;	/* don't fork() when starting GUI */
 	    netbeansArg = argv[arg];
 	    mch_memmove(&argv[arg], &argv[arg + 1],