aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-06-17 10:02:00 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-06-18 11:36:07 -0300
commit05fd154ede5d88b7304ede9cea978d6b76d1fb44 (patch)
treef0c274a24be04120bc4811ced4cf271e4ba0c52f
parent1843f0c2c60b0f4c6886141c1d504ab444d90dce (diff)
downloadrneovim-05fd154ede5d88b7304ede9cea978d6b76d1fb44.tar.gz
rneovim-05fd154ede5d88b7304ede9cea978d6b76d1fb44.tar.bz2
rneovim-05fd154ede5d88b7304ede9cea978d6b76d1fb44.zip
rstream: Implement the rstream_set_defer function
This function will be used to temporarily change the `defer` flag on rstream instances.
-rw-r--r--src/nvim/os/rstream.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/os/rstream.c b/src/nvim/os/rstream.c
index c3e0dea098..bbff12dd42 100644
--- a/src/nvim/os/rstream.c
+++ b/src/nvim/os/rstream.c
@@ -211,6 +211,15 @@ size_t rstream_available(RStream *rstream)
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
///
/// @param event Object containing data necessary to invoke the callback