From b45b89ee204eb9b35da86512baf585ad6068df90 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 7 Jul 2024 14:42:40 +0800 Subject: [PATCH] perf(tabline): use BufAdd instead of BufNew --- lua/spacevim/plugin/tabline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/spacevim/plugin/tabline.lua b/lua/spacevim/plugin/tabline.lua index ba98f13e3..5239a8185 100644 --- a/lua/spacevim/plugin/tabline.lua +++ b/lua/spacevim/plugin/tabline.lua @@ -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)