mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
channel: Implement channel_exists function
This commit is contained in:
@@ -124,6 +124,13 @@ void channel_from_stream(uv_stream_t *stream)
|
||||
channel->data.streams.uv = stream;
|
||||
}
|
||||
|
||||
bool channel_exists(uint64_t id)
|
||||
{
|
||||
Channel *channel;
|
||||
return (channel = pmap_get(uint64_t)(channels, id)) != NULL
|
||||
&& channel->enabled;
|
||||
}
|
||||
|
||||
/// Sends event/data to channel
|
||||
///
|
||||
/// @param id The channel id. If 0, the event will be sent to all
|
||||
|
Reference in New Issue
Block a user