diff --git a/lua/lualine/component.lua b/lua/lualine/component.lua index 0432832..8b92a4b 100644 --- a/lua/lualine/component.lua +++ b/lua/lualine/component.lua @@ -6,6 +6,9 @@ local M = require('lualine.utils.class'):extend() -- Used to provide a unique id for each component local component_no = 1 +function M._reset_component_id() + component_no = 1 +end -- variable to store component output for manipulation M.status = '' diff --git a/lua/lualine/utils/loader.lua b/lua/lualine/utils/loader.lua index 6a2893c..45ce2de 100644 --- a/lua/lualine/utils/loader.lua +++ b/lua/lualine/utils/loader.lua @@ -202,6 +202,7 @@ end ---loads sections and extensions or entire user config ---@param config table user config local function load_all(config) + require'lualine.component'._reset_component_id() load_components(config) load_extensions(config) end