mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
rstream: Implement the rstream_set_defer function
This function will be used to temporarily change the `defer` flag on rstream instances.
This commit is contained in:
@@ -211,6 +211,15 @@ size_t rstream_available(RStream *rstream)
|
|||||||
return rstream->wpos - rstream->rpos;
|
return rstream->wpos - rstream->rpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Sets the `defer` flag for a a RStream instance
|
||||||
|
///
|
||||||
|
/// @param rstream The RStream instance
|
||||||
|
/// @param defer The new value for the flag
|
||||||
|
void rstream_set_defer(RStream *rstream, bool defer)
|
||||||
|
{
|
||||||
|
rstream->defer = defer;
|
||||||
|
}
|
||||||
|
|
||||||
/// Runs the read callback associated with the rstream
|
/// Runs the read callback associated with the rstream
|
||||||
///
|
///
|
||||||
/// @param event Object containing data necessary to invoke the callback
|
/// @param event Object containing data necessary to invoke the callback
|
||||||
|
Reference in New Issue
Block a user