diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-20 15:13:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 15:13:55 +0800 |
commit | f1816f9ee2a8b811fd6ce4e60a843087f855f97d (patch) | |
tree | b28f8e65d98b5b346e7efb155b4d23d734eb2347 /src/nvim/main.c | |
parent | b62c0c8d9c22ae7fc9ee200733f8312efa6dbced (diff) | |
download | rneovim-f1816f9ee2a8b811fd6ce4e60a843087f855f97d.tar.gz rneovim-f1816f9ee2a8b811fd6ce4e60a843087f855f97d.tar.bz2 rneovim-f1816f9ee2a8b811fd6ce4e60a843087f855f97d.zip |
refactor(main.c): remove unreachable use_builtin_ui conditions (#22338)
When use_builtin_ui is true, Nvim will exit before line 385 is reached.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 0ecb5f742d..5f4e639b06 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -383,6 +383,7 @@ int main(int argc, char **argv) if (ui_client_channel_id) { ui_client_run(remote_ui); // NORETURN } + assert(!ui_client_channel_id && !use_builtin_ui); // Wait for UIs to set up Nvim or show early messages // and prompts (--cmd, swapfile dialog, …). @@ -583,13 +584,13 @@ int main(int argc, char **argv) set_vim_var_nr(VV_VIM_DID_ENTER, 1L); apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf); TIME_MSG("VimEnter autocommands"); - if (use_remote_ui || use_builtin_ui) { - do_autocmd_uienter(use_remote_ui ? CHAN_STDIO : 0, true); + if (use_remote_ui) { + do_autocmd_uienter(CHAN_STDIO, true); TIME_MSG("UIEnter autocommands"); } #ifdef MSWIN - if (use_remote_ui || use_builtin_ui) { + if (use_remote_ui) { os_icon_init(); } os_title_save(); |