Mercurial > vim
diff src/channel.c @ 8094:18a3f0f05244 v7.4.1341
commit https://github.com/vim/vim/commit/910b8aac5dc4693c4508b7acd2cef0bbfac04242
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 16 21:03:07 2016 +0100
patch 7.4.1341
Problem: It's difficult to add more arguments to ch_sendraw() and
ch_sendexpr().
Solution: Make the third option a dictionary.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 16 Feb 2016 21:15:05 +0100 |
parents | 3ea56a74077f |
children | 882ba5080c5c |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -697,6 +697,18 @@ channel_set_callback(channel_T *channel, } /* + * Set various properties from an "options" argument. + */ + void +channel_set_options(channel_T *channel, jobopt_T *options) +{ + channel_set_mode(channel, options->jo_mode); + + if (options->jo_callback != NULL && *options->jo_callback != NUL) + channel_set_callback(channel, options->jo_callback); +} + +/* * Set the callback for channel "channel" for the response with "id". */ void