enhache: support inlined custom component in extensions too

This commit is contained in:
shadmansaleh 2021-11-25 13:44:15 +06:00
parent 07abfeabfd
commit b7cf506785
1 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ local function load_extensions(config)
if type(extension) == 'string' then if type(extension) == 'string' then
local ok, local_extension = pcall(require, 'lualine.extensions.' .. extension) local ok, local_extension = pcall(require, 'lualine.extensions.' .. extension)
if ok then if ok then
local_extension = vim.deepcopy(local_extension) local_extension = modules.utils.deepcopy(local_extension)
load_sections(local_extension.sections, config.options) load_sections(local_extension.sections, config.options)
if local_extension.inactive_sections then if local_extension.inactive_sections then
load_sections(local_extension.inactive_sections, config.options) load_sections(local_extension.inactive_sections, config.options)
@ -224,7 +224,7 @@ Extension named `%s` was not found . Check if spelling is correct.
)) ))
end end
elseif type(extension) == 'table' then elseif type(extension) == 'table' then
local local_extension = vim.deepcopy(extension) local local_extension = modules.utils.deepcopy(extension)
load_sections(local_extension.sections, config.options) load_sections(local_extension.sections, config.options)
if local_extension.inactive_sections then if local_extension.inactive_sections then
load_sections(local_extension.inactive_sections, config.options) load_sections(local_extension.inactive_sections, config.options)