diff options
author | erw7 <erw7.github@gmail.com> | 2019-04-28 18:46:48 +0900 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-28 11:46:48 +0200 |
commit | 8072f085d2edc254334af52261c6ff68d9143834 (patch) | |
tree | c40d4363047951fc97215a0e5ead755ce1a4edfd /src/nvim/event/rstream.c | |
parent | cf80fd9e02422f90ecb967aacf7a5549246b4689 (diff) | |
download | rneovim-8072f085d2edc254334af52261c6ff68d9143834.tar.gz rneovim-8072f085d2edc254334af52261c6ff68d9143834.tar.bz2 rneovim-8072f085d2edc254334af52261c6ff68d9143834.zip |
win: stream_init() issue with tty on Windows #9884
ref #9825
Diffstat (limited to 'src/nvim/event/rstream.c')
-rw-r--r-- | src/nvim/event/rstream.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c index 6812b342bf..19907d2e45 100644 --- a/src/nvim/event/rstream.c +++ b/src/nvim/event/rstream.c @@ -21,16 +21,14 @@ #endif void rstream_init_fd(Loop *loop, Stream *stream, int fd, size_t bufsize) - FUNC_ATTR_NONNULL_ARG(1) - FUNC_ATTR_NONNULL_ARG(2) + FUNC_ATTR_NONNULL_ARG(1, 2) { stream_init(loop, stream, fd, NULL); rstream_init(stream, bufsize); } void rstream_init_stream(Stream *stream, uv_stream_t *uvstream, size_t bufsize) - FUNC_ATTR_NONNULL_ARG(1) - FUNC_ATTR_NONNULL_ARG(2) + FUNC_ATTR_NONNULL_ARG(1, 2) { stream_init(NULL, stream, -1, uvstream); rstream_init(stream, bufsize); @@ -138,6 +136,10 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf) } // Called by the by the 'idle' handle to emulate a reading event +// +// Idle callbacks are invoked once per event loop: +// - to perform some very low priority activity. +// - to keep the loop "alive" (so there is always an event to process) static void fread_idle_cb(uv_idle_t *handle) { uv_fs_t req; |