diff options
| author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 12:06:31 -0300 |
|---|---|---|
| committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 12:06:31 -0300 |
| commit | 953d61cbf82d5f1acd68bd1ae2101d92f5ec5492 (patch) | |
| tree | d4aa1fe08ad3f0a7e27b6628aad4925cd1fbfb2a /src/nvim/os/input.c | |
| parent | b92630c2fff7950141630f0d62b11404d0589ece (diff) | |
| parent | 4dc642aa622cfac09f2f4752907137d68d8508fe (diff) | |
| download | rneovim-953d61cbf82d5f1acd68bd1ae2101d92f5ec5492.tar.gz rneovim-953d61cbf82d5f1acd68bd1ae2101d92f5ec5492.tar.bz2 rneovim-953d61cbf82d5f1acd68bd1ae2101d92f5ec5492.zip | |
Merge PR #895 'Core service providers...'
Diffstat (limited to 'src/nvim/os/input.c')
| -rw-r--r-- | src/nvim/os/input.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index 58bdf0cf52..15aebdbf3d 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -34,7 +34,7 @@ static bool eof = false, started_reading = false; void input_init(void) { - read_stream = rstream_new(read_cb, READ_BUFFER_SIZE, NULL, false); + read_stream = rstream_new(read_cb, READ_BUFFER_SIZE, NULL, NULL); rstream_set_file(read_stream, read_cmd_fd); } @@ -129,7 +129,12 @@ bool os_isatty(int fd) static bool input_poll(int32_t ms) { - return input_ready() || event_poll(ms) || input_ready(); + EventSource input_sources[] = { + rstream_event_source(read_stream), + NULL + }; + + return input_ready() || event_poll(ms, input_sources) || input_ready(); } // This is a replacement for the old `WaitForChar` function in os_unix.c |
