]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1811 v7.4.1811
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Apr 2016 16:07:05 +0000 (18:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Apr 2016 16:07:05 +0000 (18:07 +0200)
Problem:    Netbeans channel gets garbage collected.
Solution:   Set reference in nb_channel.

src/eval.c
src/netbeans.c
src/proto/netbeans.pro
src/version.c

index b3a3b415a5190aa3533c0795cecded78efa504a4..2b4f23012c1fcedad75d89d652b3f723fca3624d 100644 (file)
@@ -7025,6 +7025,9 @@ garbage_collect(int testing)
 #ifdef FEAT_JOB_CHANNEL
     abort = abort || set_ref_in_channel(copyID);
 #endif
+#ifdef FEAT_NETBEANS_INTG
+    abort = abort || set_ref_in_nb_channel(copyID);
+#endif
 
     if (!abort)
     {
index b0e7d9e0a6e98c9d8708ab57e343ce7a07303af7..a80067f43721b66aaa063d75aefa786cc88b261e 100644 (file)
@@ -2585,6 +2585,23 @@ netbeans_send_disconnect(void)
     }
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
+    int
+set_ref_in_nb_channel(int copyID)
+{
+    int abort = FALSE;
+    typval_T tv;
+
+    if (nb_channel != NULL)
+    {
+       tv.v_type = VAR_CHANNEL;
+       tv.vval.v_channel = nb_channel;
+       abort = set_ref_in_item(&tv, copyID, NULL, NULL);
+    }
+    return abort;
+}
+#endif
+
 #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_W32) || defined(PROTO)
 /*
  * Tell netbeans that the window was moved or resized.
index 2df71a11afa7928db6f571735284b213d4f0594f..869e9663c520c38e30188cdaa7b0adafca9b3629 100644 (file)
@@ -10,6 +10,7 @@ void netbeans_beval_cb(BalloonEval *beval, int state);
 int netbeans_active(void);
 void netbeans_open(char *params, int doabort);
 void netbeans_send_disconnect(void);
+int set_ref_in_nb_channel(int copyID);
 void netbeans_frame_moved(int new_x, int new_y);
 void netbeans_file_activated(buf_T *bufp);
 void netbeans_file_opened(buf_T *bufp);
index 28308a635a01b959771feda03b6c0c64ab8dfbbc..714a6d92b1331ea771aa51e92325a31fe69a7da4 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1811,
 /**/
     1810,
 /**/