diff options
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r-- | src/nvim/os/shell.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index 7449ac637c..1b279f18f5 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -244,6 +244,9 @@ static int shell(const char *cmd, job_stop(job); return -1; } + // close the input stream after everything is written + job_write_cb(job, shell_write_cb); + } else { // close the input stream, let the process know that no more input is // coming job_close_in(job); @@ -447,3 +450,9 @@ static void write_output(char *output, size_t remaining) curbuf->b_no_eol_lnum = 0; } } + +static void shell_write_cb(WStream *wstream, void *data, int status) +{ + Job *job = data; + job_close_in(job); +} |