diff --git a/lua/lualine.lua b/lua/lualine.lua index 9e09085..89be952 100644 --- a/lua/lualine.lua +++ b/lua/lualine.lua @@ -109,9 +109,12 @@ end local function exec_autocommands() _G.set_lualine_theme = set_lualine_theme _G.set_active_statusline = statusline + vim.cmd([[augroup lualine]]) + vim.cmd([[autocmd!]]) vim.cmd([[autocmd WinEnter,BufEnter * setlocal statusline=%!v:lua.set_active_statusline(1)]]) vim.cmd([[autocmd WinLeave,BufLeave * lua require('lualine').set_inactive_statusline()]]) vim.cmd([[autocmd ColorScheme * call v:lua.set_lualine_theme()]]) + vim.cmd([[augroup END]]) end function M.status()