Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
8093:4ffd0f8167f8 | 8094:18a3f0f05244 |
---|---|
695 vim_free(channel->ch_callback); | 695 vim_free(channel->ch_callback); |
696 channel->ch_callback = vim_strsave(callback); | 696 channel->ch_callback = vim_strsave(callback); |
697 } | 697 } |
698 | 698 |
699 /* | 699 /* |
700 * Set various properties from an "options" argument. | |
701 */ | |
702 void | |
703 channel_set_options(channel_T *channel, jobopt_T *options) | |
704 { | |
705 channel_set_mode(channel, options->jo_mode); | |
706 | |
707 if (options->jo_callback != NULL && *options->jo_callback != NUL) | |
708 channel_set_callback(channel, options->jo_callback); | |
709 } | |
710 | |
711 /* | |
700 * Set the callback for channel "channel" for the response with "id". | 712 * Set the callback for channel "channel" for the response with "id". |
701 */ | 713 */ |
702 void | 714 void |
703 channel_set_req_callback(channel_T *channel, char_u *callback, int id) | 715 channel_set_req_callback(channel_T *channel, char_u *callback, int id) |
704 { | 716 { |