0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

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.
This commit is contained in:
Bram Moolenaar
2016-02-16 21:03:07 +01:00
parent 7d63f62460
commit 910b8aac5d
10 changed files with 91 additions and 54 deletions

View File

@@ -696,6 +696,18 @@ channel_set_callback(channel_T *channel, char_u *callback)
channel->ch_callback = vim_strsave(callback);
}
/*
* 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".
*/