fix(startup): trigger UIEnter for the correct channel (#25860)

This commit is contained in:
zeertzjq
2023-11-01 12:16:37 +08:00
committed by GitHub
parent 4e6096a67f
commit d7359a8742
5 changed files with 36 additions and 23 deletions

View File

@@ -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) {