aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/shell.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-05-12 13:18:04 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2016-08-20 10:25:33 +0200
commit215922120c43163f4e1cc00851bd1b86890d3a28 (patch)
tree60e3d96d8e31ea8d72d197ee740a4af89e5735cf /src/nvim/os/shell.c
parent1b825a9ada4d89059645bc7a458e1e8d931c6161 (diff)
downloadrneovim-215922120c43163f4e1cc00851bd1b86890d3a28.tar.gz
rneovim-215922120c43163f4e1cc00851bd1b86890d3a28.tar.bz2
rneovim-215922120c43163f4e1cc00851bd1b86890d3a28.zip
stream: set data together with callback
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r--src/nvim/os/shell.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index 64c673930a..ba52b9f661 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -236,10 +236,10 @@ static int do_os_system(char **argv,
}
proc->out->events = NULL;
rstream_init(proc->out, 0);
- rstream_start(proc->out, data_cb);
+ rstream_start(proc->out, data_cb, &buf);
proc->err->events = NULL;
rstream_init(proc->err, 0);
- rstream_start(proc->err, data_cb);
+ rstream_start(proc->err, data_cb, &buf);
// write the input, if any
if (input) {
@@ -251,7 +251,7 @@ static int do_os_system(char **argv,
return -1;
}
// close the input stream after everything is written
- wstream_set_write_cb(&in, shell_write_cb);
+ wstream_set_write_cb(&in, shell_write_cb, NULL);
}
// invoke busy_start here so event_poll_until wont change the busy state for
@@ -546,5 +546,5 @@ static size_t write_output(char *output, size_t remaining, bool to_buffer,
static void shell_write_cb(Stream *stream, void *data, int status)
{
- stream_close(stream, NULL);
+ stream_close(stream, NULL, NULL);
}