diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-21 07:58:51 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-21 13:28:53 -0300 |
commit | cb87670ff819161fb6ab70790d00ab87fc965aa7 (patch) | |
tree | ffa61c462855c877f0a9461f3e5f45d5f21b4583 /src/nvim/msgpack_rpc | |
parent | 1beee0685d33adf15457927b2487e8f89da178a0 (diff) | |
download | rneovim-cb87670ff819161fb6ab70790d00ab87fc965aa7.tar.gz rneovim-cb87670ff819161fb6ab70790d00ab87fc965aa7.tar.bz2 rneovim-cb87670ff819161fb6ab70790d00ab87fc965aa7.zip |
main: Initialize event loop before command_line_scan
The call to `event_init()` was too late. `command_line_scan()` in `main()` could
already need the loop initialized. Ref https://github.com/neovim/neovim/issues/3045#issuecomment-123405833.
A consequence of this change is that it was necessary to move the
`channel_from_stdio()` call to `command_line_scan()` when embedded_mode is set.
Diffstat (limited to 'src/nvim/msgpack_rpc')
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 0e3b8200c9..d8f86cefab 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -93,11 +93,6 @@ void channel_init(void) channels = pmap_new(uint64_t)(); event_strings = pmap_new(cstr_t)(); msgpack_sbuffer_init(&out_buffer); - - if (embedded_mode) { - channel_from_stdio(); - } - remote_ui_init(); } @@ -316,7 +311,7 @@ bool channel_close(uint64_t id) /// Creates an API channel from stdin/stdout. This is used when embedding /// Neovim -static void channel_from_stdio(void) +void channel_from_stdio(void) { Channel *channel = register_channel(kChannelTypeStdio); incref(channel); // stdio channels are only closed on exit |