diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-30 18:07:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-30 18:07:05 +0200 |
commit | 3266c85a44a637862b0ed6e531680c6ab2897ab5 (patch) | |
tree | 667b84fb5079098085c7d00294912e85afd9c868 | |
parent | 715d285d79a1d97928dd717278e25e6de45d1496 (diff) | |
download | vim-3266c85a44a637862b0ed6e531680c6ab2897ab5.zip |
patch 7.4.1811
Problem: Netbeans channel gets garbage collected.
Solution: Set reference in nb_channel.
-rw-r--r-- | src/eval.c | 3 | ||||
-rw-r--r-- | src/netbeans.c | 17 | ||||
-rw-r--r-- | src/proto/netbeans.pro | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 23 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index b3a3b415a..2b4f23012 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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) { diff --git a/src/netbeans.c b/src/netbeans.c index b0e7d9e0a..a80067f43 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -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. diff --git a/src/proto/netbeans.pro b/src/proto/netbeans.pro index 2df71a11a..869e9663c 100644 --- a/src/proto/netbeans.pro +++ b/src/proto/netbeans.pro @@ -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); diff --git a/src/version.c b/src/version.c index 28308a635..714a6d92b 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1811, +/**/ 1810, /**/ 1809, |