patch 7.4.1485
Problem: Job input from buffer is not implemented.
Solution: Implement it. Add "in-top" and "in-bot" options.
diff --git a/src/structs.h b/src/structs.h
index 2989dcd..42ca96c 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1267,6 +1267,8 @@
int jv_exitval;
char_u *jv_exit_cb; /* allocated */
+ buf_T *jv_in_buf; /* buffer from "in-name" */
+
int jv_refcount; /* reference count */
channel_T *jv_channel; /* channel for I/O, reference counted */
};
@@ -1347,7 +1349,10 @@
cbq_T ch_cb_head; /* dummy node for per-request callbacks */
char_u *ch_callback; /* call when a msg is not handled */
+
buf_T *ch_buffer; /* buffer to read from or write to */
+ linenr_T ch_buf_top; /* next line to send */
+ linenr_T ch_buf_bot; /* last line to send */
} chanpart_T;
struct channel_S {
@@ -1402,6 +1407,8 @@
#define JO_OUT_NAME 0x80000 /* "out-name" */
#define JO_ERR_NAME 0x100000 /* "err-name" (JO_OUT_NAME << 1) */
#define JO_IN_NAME 0x200000 /* "in-name" (JO_OUT_NAME << 2) */
+#define JO_IN_TOP 0x400000 /* "in-top" */
+#define JO_IN_BOT 0x800000 /* "in-bot" */
#define JO_ALL 0xffffff
#define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
@@ -1433,6 +1440,9 @@
char_u jo_io_name_buf[4][NUMBUFLEN];
char_u *jo_io_name[4]; /* not allocated! */
+ linenr_T jo_in_top;
+ linenr_T jo_in_bot;
+
char_u *jo_callback; /* not allocated! */
char_u *jo_out_cb; /* not allocated! */
char_u *jo_err_cb; /* not allocated! */