patch 7.4.1398
Problem: The close-cb option is not implemented yet.
Solution: Implemente close-cb. (Yasuhiro Matsumoto)
diff --git a/src/structs.h b/src/structs.h
index e1720ce..cf5ae2b 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1366,9 +1366,12 @@
* first error until the connection works
* again. */
- void (*ch_close_cb)(void); /* callback for when channel is closed */
+ void (*ch_nb_close_cb)(void);
+ /* callback for Netbeans when channel is
+ * closed */
char_u *ch_callback; /* call when any msg is not handled */
+ char_u *ch_close_cb; /* call when channel is closed */
job_T *ch_job; /* Job that uses this channel; this does not
* count as a reference to avoid a circular
@@ -1377,25 +1380,27 @@
int ch_refcount; /* reference count */
};
-#define JO_MODE 0x0001 /* channel mode */
-#define JO_IN_MODE 0x0002 /* stdin mode */
-#define JO_OUT_MODE 0x0004 /* stdout mode */
-#define JO_ERR_MODE 0x0008 /* stderr mode */
-#define JO_CALLBACK 0x0010 /* channel callback */
-#define JO_OUT_CALLBACK 0x0020 /* stdout callback */
-#define JO_ERR_CALLBACK 0x0040 /* stderr callback */
-#define JO_WAITTIME 0x0080 /* only for ch_open() */
-#define JO_TIMEOUT 0x0100 /* all timeouts */
-#define JO_OUT_TIMEOUT 0x0200 /* stdout timeouts */
-#define JO_ERR_TIMEOUT 0x0400 /* stderr timeouts */
-#define JO_PART 0x0800 /* "part" */
-#define JO_ID 0x1000 /* "id" */
-#define JO_STOPONEXIT 0x2000 /* "stoponexit" */
-#define JO_EXIT_CB 0x4000 /* "exit-cb" */
-#define JO_ALL 0xffffff
+#define JO_MODE 0x0001 /* channel mode */
+#define JO_IN_MODE 0x0002 /* stdin mode */
+#define JO_OUT_MODE 0x0004 /* stdout mode */
+#define JO_ERR_MODE 0x0008 /* stderr mode */
+#define JO_CALLBACK 0x0010 /* channel callback */
+#define JO_OUT_CALLBACK 0x0020 /* stdout callback */
+#define JO_ERR_CALLBACK 0x0040 /* stderr callback */
+#define JO_CLOSE_CALLBACK 0x0080 /* close callback */
+#define JO_WAITTIME 0x0100 /* only for ch_open() */
+#define JO_TIMEOUT 0x0200 /* all timeouts */
+#define JO_OUT_TIMEOUT 0x0400 /* stdout timeouts */
+#define JO_ERR_TIMEOUT 0x0800 /* stderr timeouts */
+#define JO_PART 0x1000 /* "part" */
+#define JO_ID 0x2000 /* "id" */
+#define JO_STOPONEXIT 0x4000 /* "stoponexit" */
+#define JO_EXIT_CB 0x8000 /* "exit-cb" */
+#define JO_ALL 0xffffff
#define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
-#define JO_CB_ALL (JO_CALLBACK + JO_OUT_CALLBACK + JO_ERR_CALLBACK)
+#define JO_CB_ALL \
+ (JO_CALLBACK + JO_OUT_CALLBACK + JO_ERR_CALLBACK + JO_CLOSE_CALLBACK)
#define JO_TIMEOUT_ALL (JO_TIMEOUT + JO_OUT_TIMEOUT + JO_ERR_TIMEOUT)
/*
@@ -1412,6 +1417,7 @@
char_u *jo_callback; /* not allocated! */
char_u *jo_out_cb; /* not allocated! */
char_u *jo_err_cb; /* not allocated! */
+ char_u *jo_close_cb; /* not allocated! */
int jo_waittime;
int jo_timeout;
int jo_out_timeout;