0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1485

Problem:    Job input from buffer is not implemented.
Solution:   Implement it.  Add "in-top" and "in-bot" options.
This commit is contained in:
Bram Moolenaar
2016-03-03 22:51:40 +01:00
parent c25558bff4
commit 014069a7ac
8 changed files with 177 additions and 24 deletions

View File

@@ -1267,6 +1267,8 @@ struct jobvar_S
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 @@ typedef struct {
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 @@ struct channel_S {
#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 @@ typedef struct
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! */