diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-09 23:14:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-09 23:14:07 +0100 |
commit | 29fd03878c41526a586d77b3f3cd7938d26297af (patch) | |
tree | 4457df959faca15aa580deca111a62a4b179c675 /src/channel.c | |
parent | af1a0e371e739f8dff337fd31da0ff8ffb347b43 (diff) | |
download | vim-git-29fd03878c41526a586d77b3f3cd7938d26297af.tar.gz |
patch 7.4.1529v7.4.1529
Problem: Specifying buffer number for channel not implemented yet.
Solution: Implement passing a buffer number.
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c index 094b58f2c..e7cee1998 100644 --- a/src/channel.c +++ b/src/channel.c @@ -987,7 +987,11 @@ channel_set_options(channel_T *channel, jobopt_T *opt) /* writing output to a buffer. Default mode is NL. */ if (!(opt->jo_set & JO_OUT_MODE)) channel->ch_part[PART_OUT].ch_mode = MODE_NL; - channel->ch_part[PART_OUT].ch_buffer = + if (opt->jo_set & JO_OUT_BUF) + channel->ch_part[PART_OUT].ch_buffer = + buflist_findnr(opt->jo_io_buf[PART_OUT]); + else + channel->ch_part[PART_OUT].ch_buffer = find_buffer(opt->jo_io_name[PART_OUT], FALSE); ch_logs(channel, "writing out to buffer '%s'", (char *)channel->ch_part[PART_OUT].ch_buffer->b_ffname); @@ -1003,6 +1007,9 @@ channel_set_options(channel_T *channel, jobopt_T *opt) if (opt->jo_io[PART_ERR] == JIO_OUT) channel->ch_part[PART_ERR].ch_buffer = channel->ch_part[PART_OUT].ch_buffer; + else if (opt->jo_set & JO_ERR_BUF) + channel->ch_part[PART_ERR].ch_buffer = + buflist_findnr(opt->jo_io_buf[PART_ERR]); else channel->ch_part[PART_ERR].ch_buffer = find_buffer(opt->jo_io_name[PART_ERR], TRUE); |