1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:20:04 +08:00

perf(tabline): use BufAdd instead of BufNew

This commit is contained in:
Eric Wong 2024-07-07 14:42:40 +08:00
parent 2b9fd55094
commit b45b89ee20

View File

@ -328,7 +328,7 @@ function M.enable()
end
end
local tabline_augroup = vim.api.nvim_create_augroup('spacevim_tabline', { clear = true })
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufReadPost', 'BufNew' }, {
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufReadPost', 'BufAdd' }, {
callback = vim.schedule_wrap(function(event)
if
vim.api.nvim_buf_is_valid(event.buf)