diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-03-16 16:05:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 16:05:40 +0100 |
commit | 4e5e0076cb643b52d762f226b27f22c8fb837567 (patch) | |
tree | 572699fc6ed68c92a8fab6b8f41be15423899f1f /src/nvim/main.c | |
parent | fa79a016bc894d3f89eddc7744868d2dd5458d51 (diff) | |
parent | f01d203b70f426c1538813b3bacb4483e914ab44 (diff) | |
download | rneovim-4e5e0076cb643b52d762f226b27f22c8fb837567.tar.gz rneovim-4e5e0076cb643b52d762f226b27f22c8fb837567.tar.bz2 rneovim-4e5e0076cb643b52d762f226b27f22c8fb837567.zip |
Merge pull request #17708 from bfredl/ui_client
feat(ui): UI client episode II: event handlers
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 95ef306745..d67b47e82c 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -112,7 +112,6 @@ static const char *err_too_many_args = N_("Too many edit arguments"); static const char *err_extra_cmd = N_("Too many \"+command\", \"-c command\" or \"--cmd command\" arguments"); - void event_init(void) { loop_init(&main_loop, NULL); @@ -344,6 +343,12 @@ int main(int argc, char **argv) TIME_MSG("init screen for UI"); } + if (ui_client_channel_id) { + ui_client_init(ui_client_channel_id); + ui_client_execute(ui_client_channel_id); + abort(); // unreachable + } + init_default_mappings(); // Default mappings. TIME_MSG("init default mappings"); @@ -840,9 +845,8 @@ static void remote_request(mparm_T *params, int remote_args, exit(1); } - ui_client_init(chan); - ui_client_execute(chan); - abort(); // unreachable + ui_client_channel_id = chan; + return; } Array args = ARRAY_DICT_INIT; |