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:
@@ -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".
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user