mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
fix(ui): trigger TabNewEntered after split new tab
This commit is contained in:
parent
9b3045103f
commit
1cd7824dd6
@ -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.
|
||||
|
@ -35,6 +35,14 @@ describe('TabNewEntered', function()
|
||||
eq('entered', nvim('exec', 'execute "normal \\<C-W>T"', true))
|
||||
end)
|
||||
end)
|
||||
describe('with tab split #4334', function()
|
||||
it('works when create a tab by using tab split command', function()
|
||||
clear()
|
||||
nvim('command', 'au! TabNewEntered * let b:entered = "entered"')
|
||||
nvim('command', 'tab split')
|
||||
eq('entered', nvim('exec', 'echo b:entered', true))
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user