mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
aec4938a21
Problem: `vim.rpcnotify(0)` and `rpcnotify(0)` are documented as follows: If {channel} is 0, the event is broadcast to all channels. But that's not actually true. Channels must call `nvim_subscribe` to receive "broadcast" events, so it's actually "multicast". - Assuming there is a use-case for "broadcast", the current model adds an extra step for broadcasting: all channels need to "subscribe". - The presence of `nvim_subscribe` is a source of confusion for users, because its name implies something more generally useful than what it does. Presumably the use-case of `nvim_subscribe` is to avoid "noise" on RPC channels not expected a broadcast notification, and potentially an error if the channel client reports an unknown event. Solution: - Deprecate `nvim_subscribe`/`nvim_unsubscribe`. - If applications want to multicast, they can keep their own multicast list. Or they can use `nvim_list_chans()` and `nvim_get_chan_info()` to enumerate and filter the clients they want to target. - Always send "broadcast" events to ALL channels. Don't require channels to "subscribe" to receive broadcasts. This matches the documented behavior of `rpcnotify()`. |
||
---|---|---|
.. | ||
api_functions_spec.lua | ||
buf_functions_spec.lua | ||
changedtick_spec.lua | ||
container_functions_spec.lua | ||
ctx_functions_spec.lua | ||
environ_spec.lua | ||
errorlist_spec.lua | ||
eval_spec.lua | ||
executable_spec.lua | ||
execute_spec.lua | ||
exepath_spec.lua | ||
fnamemodify_spec.lua | ||
functions_spec.lua | ||
getline_spec.lua | ||
glob_spec.lua | ||
has_spec.lua | ||
hostname_spec.lua | ||
input_spec.lua | ||
json_functions_spec.lua | ||
lang_spec.lua | ||
let_spec.lua | ||
map_functions_spec.lua | ||
match_functions_spec.lua | ||
minmax_functions_spec.lua | ||
modeline_spec.lua | ||
msgpack_functions_spec.lua | ||
null_spec.lua | ||
operators_spec.lua | ||
printf_spec.lua | ||
reltime_spec.lua | ||
screenchar_spec.lua | ||
screenpos_spec.lua | ||
server_spec.lua | ||
setpos_spec.lua | ||
sort_spec.lua | ||
special_vars_spec.lua | ||
state_spec.lua | ||
string_spec.lua | ||
system_spec.lua | ||
timer_spec.lua | ||
uniq_spec.lua | ||
vvar_event_spec.lua | ||
wait_spec.lua | ||
writefile_spec.lua |