mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46:29 +00:00
fix(startup): trigger UIEnter for the correct channel (#25860)
This commit is contained in:
@@ -2570,6 +2570,9 @@ void do_autocmd_uienter(uint64_t chanid, bool attached)
|
||||
{
|
||||
static bool recursive = false;
|
||||
|
||||
if (starting == NO_SCREEN) {
|
||||
return; // user config hasn't been sourced yet
|
||||
}
|
||||
if (recursive) {
|
||||
return; // disallow recursion
|
||||
}
|
||||
|
@@ -589,7 +589,7 @@ int main(int argc, char **argv)
|
||||
apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf);
|
||||
TIME_MSG("VimEnter autocommands");
|
||||
if (use_remote_ui) {
|
||||
do_autocmd_uienter(CHAN_STDIO, true);
|
||||
do_autocmd_uienter_all();
|
||||
TIME_MSG("UIEnter autocommands");
|
||||
}
|
||||
|
||||
|
@@ -337,6 +337,16 @@ void vim_beep(unsigned val)
|
||||
}
|
||||
}
|
||||
|
||||
/// Trigger UIEnter for all attached UIs.
|
||||
/// Used on startup after VimEnter.
|
||||
void do_autocmd_uienter_all(void)
|
||||
{
|
||||
for (size_t i = 0; i < ui_count; i++) {
|
||||
UIData *data = uis[i]->data;
|
||||
do_autocmd_uienter(data->channel_id, true);
|
||||
}
|
||||
}
|
||||
|
||||
void ui_attach_impl(UI *ui, uint64_t chanid)
|
||||
{
|
||||
if (ui_count == MAX_UI_COUNT) {
|
||||
|
Reference in New Issue
Block a user