From 1cd7824dd69ee14b734713e61bef6bb713db8547 Mon Sep 17 00:00:00 2001 From: glepnir Date: Fri, 6 Oct 2023 19:40:02 +0800 Subject: fix(ui): trigger TabNewEntered after split new tab --- src/nvim/window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/window.c b/src/nvim/window.c index 41199306fa..be1bb8edaf 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4261,7 +4261,11 @@ int may_open_tabpage(void) cmdmod.cmod_tab = 0; // reset it to avoid doing it twice postponed_split_tab = 0; - return win_new_tabpage(n, NULL); + int status = win_new_tabpage(n, NULL); + if (status == OK) { + apply_autocmds(EVENT_TABNEWENTERED, NULL, NULL, false, curbuf); + } + return status; } // Create up to "maxcount" tabpages with empty windows. -- cgit