Skip to content

Commit

Permalink
fix: merge icon tables preferring user values (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
freddiehaddad authored Nov 28, 2023
1 parent c97f281 commit a50df1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/feline/generator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,12 @@ local function parse_component(gen, component, use_short_provider, winid, sectio

local right_sep_str = parse_sep_list(gen, component.right_sep, hl.bg, is_component_empty)

if component.icon and type(component.icon) ~= 'table' then
icon = component.icon
if component.icon then
if type(component.icon) == 'table' and type(icon) == 'table' then
icon = vim.tbl_deep_extend('keep', component.icon, icon)
else
icon = component.icon
end
end

icon = parse_icon(gen, icon, hl, is_component_empty)
Expand Down

0 comments on commit a50df1f

Please sign in to comment.