diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-07-15 19:48:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-15 19:48:40 +0200 |
commit | c230ef24a2b5bcd21902ca7fd89ff9ecd455638f (patch) | |
tree | d14f825bdaae57e1dbdae7ee1a253de880929fc7 /src | |
parent | 4874214139ab86f7033d5e6c602f7515ed813443 (diff) | |
parent | c1807411899d3fc8a1ff6451ccb398e009b76337 (diff) | |
download | rneovim-c230ef24a2b5bcd21902ca7fd89ff9ecd455638f.tar.gz rneovim-c230ef24a2b5bcd21902ca7fd89ff9ecd455638f.tar.bz2 rneovim-c230ef24a2b5bcd21902ca7fd89ff9ecd455638f.zip |
Merge pull request #8746 from oni-link/fix.rpcstart2
Fix crash in channel_job_start() in combination with rpc and unknown command
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/channel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/channel.c b/src/nvim/channel.c index 6ad64bbb85..67306d7e11 100644 --- a/src/nvim/channel.c +++ b/src/nvim/channel.c @@ -288,7 +288,6 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, chan->on_stdout = on_stdout; chan->on_stderr = on_stderr; chan->on_exit = on_exit; - chan->is_rpc = rpc; if (pty) { if (detach) { @@ -326,7 +325,7 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, has_out = true; has_err = false; } else { - has_out = chan->is_rpc || callback_reader_set(chan->on_stdout); + has_out = rpc || callback_reader_set(chan->on_stdout); has_err = callback_reader_set(chan->on_stderr); } int status = process_spawn(proc, true, has_out, has_err); @@ -347,7 +346,7 @@ Channel *channel_job_start(char **argv, CallbackReader on_stdout, rstream_init(&proc->out, 0); } - if (chan->is_rpc) { + if (rpc) { // the rpc takes over the in and out streams rpc_start(chan); } else { |