Skip to content

Commit 3266c85

Browse files
committed
patch 7.4.1811
Problem: Netbeans channel gets garbage collected. Solution: Set reference in nb_channel.
1 parent 715d285 commit 3266c85

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

src/eval.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7025,6 +7025,9 @@ garbage_collect(int testing)
70257025
#ifdef FEAT_JOB_CHANNEL
70267026
abort = abort || set_ref_in_channel(copyID);
70277027
#endif
7028+
#ifdef FEAT_NETBEANS_INTG
7029+
abort = abort || set_ref_in_nb_channel(copyID);
7030+
#endif
70287031

70297032
if (!abort)
70307033
{

src/netbeans.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,23 @@ netbeans_send_disconnect(void)
25852585
}
25862586
}
25872587

2588+
#if defined(FEAT_EVAL) || defined(PROTO)
2589+
int
2590+
set_ref_in_nb_channel(int copyID)
2591+
{
2592+
int abort = FALSE;
2593+
typval_T tv;
2594+
2595+
if (nb_channel != NULL)
2596+
{
2597+
tv.v_type = VAR_CHANNEL;
2598+
tv.vval.v_channel = nb_channel;
2599+
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
2600+
}
2601+
return abort;
2602+
}
2603+
#endif
2604+
25882605
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_W32) || defined(PROTO)
25892606
/*
25902607
* Tell netbeans that the window was moved or resized.

src/proto/netbeans.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ void netbeans_beval_cb(BalloonEval *beval, int state);
1010
int netbeans_active(void);
1111
void netbeans_open(char *params, int doabort);
1212
void netbeans_send_disconnect(void);
13+
int set_ref_in_nb_channel(int copyID);
1314
void netbeans_frame_moved(int new_x, int new_y);
1415
void netbeans_file_activated(buf_T *bufp);
1516
void netbeans_file_opened(buf_T *bufp);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ static char *(features[]) =
753753

754754
static int included_patches[] =
755755
{ /* Add new patch number below this line */
756+
/**/
757+
1811,
756758
/**/
757759
1810,
758760
/**/

0 commit comments

Comments
 (0)