mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
refactor(main.c): remove unreachable use_builtin_ui conditions (#22338)
When use_builtin_ui is true, Nvim will exit before line 385 is reached.
This commit is contained in:
@@ -1794,7 +1794,7 @@ v:event Dictionary of event data for the current |autocommand|. Valid
|
|||||||
abort Whether the event triggered during
|
abort Whether the event triggered during
|
||||||
an aborting condition (e.g. |c_Esc| or
|
an aborting condition (e.g. |c_Esc| or
|
||||||
|c_CTRL-C| for |CmdlineLeave|).
|
|c_CTRL-C| for |CmdlineLeave|).
|
||||||
chan |channel-id| or 0 for "internal".
|
chan |channel-id|
|
||||||
cmdlevel Level of cmdline.
|
cmdlevel Level of cmdline.
|
||||||
cmdtype Type of cmdline, |cmdline-char|.
|
cmdtype Type of cmdline, |cmdline-char|.
|
||||||
cwd Current working directory.
|
cwd Current working directory.
|
||||||
|
@@ -383,6 +383,7 @@ int main(int argc, char **argv)
|
|||||||
if (ui_client_channel_id) {
|
if (ui_client_channel_id) {
|
||||||
ui_client_run(remote_ui); // NORETURN
|
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
|
// Wait for UIs to set up Nvim or show early messages
|
||||||
// and prompts (--cmd, swapfile dialog, …).
|
// and prompts (--cmd, swapfile dialog, …).
|
||||||
@@ -583,13 +584,13 @@ int main(int argc, char **argv)
|
|||||||
set_vim_var_nr(VV_VIM_DID_ENTER, 1L);
|
set_vim_var_nr(VV_VIM_DID_ENTER, 1L);
|
||||||
apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf);
|
apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf);
|
||||||
TIME_MSG("VimEnter autocommands");
|
TIME_MSG("VimEnter autocommands");
|
||||||
if (use_remote_ui || use_builtin_ui) {
|
if (use_remote_ui) {
|
||||||
do_autocmd_uienter(use_remote_ui ? CHAN_STDIO : 0, true);
|
do_autocmd_uienter(CHAN_STDIO, true);
|
||||||
TIME_MSG("UIEnter autocommands");
|
TIME_MSG("UIEnter autocommands");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MSWIN
|
#ifdef MSWIN
|
||||||
if (use_remote_ui || use_builtin_ui) {
|
if (use_remote_ui) {
|
||||||
os_icon_init();
|
os_icon_init();
|
||||||
}
|
}
|
||||||
os_title_save();
|
os_title_save();
|
||||||
|
@@ -208,7 +208,7 @@ static void tinput_wait_enqueue(void **argv)
|
|||||||
input->paste = 2;
|
input->paste = 2;
|
||||||
}
|
}
|
||||||
rbuffer_reset(input->key_buffer);
|
rbuffer_reset(input->key_buffer);
|
||||||
} else { // enqueue input for the main thread or Nvim server
|
} else { // enqueue input
|
||||||
RBUFFER_UNTIL_EMPTY(input->key_buffer, buf, len) {
|
RBUFFER_UNTIL_EMPTY(input->key_buffer, buf, len) {
|
||||||
const String keys = { .data = buf, .size = len };
|
const String keys = { .data = buf, .size = len };
|
||||||
MAXSIZE_TEMP_ARRAY(args, 1);
|
MAXSIZE_TEMP_ARRAY(args, 1);
|
||||||
|
Reference in New Issue
Block a user