Mercurial > vim
changeset 9052:3a6b66c02d6d v7.4.1811
commit https://github.com/vim/vim/commit/3266c85a44a637862b0ed6e531680c6ab2897ab5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 30 18:07:05 2016 +0200
patch 7.4.1811
Problem: Netbeans channel gets garbage collected.
Solution: Set reference in nb_channel.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 30 Apr 2016 18:15:06 +0200 |
parents | 90d5e86e27e5 |
children | 984b355f1217 |
files | src/eval.c src/netbeans.c src/proto/netbeans.pro src/version.c |
diffstat | 4 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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.
--- a/src/proto/netbeans.pro +++ b/src/proto/netbeans.pro @@ -10,6 +10,7 @@ void netbeans_beval_cb(BalloonEval *beva 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);