fix(nvim): properly set bg color for filenameblock right sep

This commit is contained in:
Price Hiller 2023-09-17 07:08:16 -05:00
parent 5451d2eba0
commit 5a2bfee106
No known key found for this signature in database

View File

@ -256,7 +256,8 @@ return {
end, end,
}, { }, {
provider = seps.full.right .. " ", provider = seps.full.right .. " ",
hl = function() hl = function(self)
local bg = self.bg_color_right
if conditions.is_active() then if conditions.is_active() then
return { fg = colors.sumiInk4, bg = colors.carpYellow } return { fg = colors.sumiInk4, bg = colors.carpYellow }
else else
@ -275,11 +276,12 @@ return {
FileFlags, FileFlags,
}, { provider = "%<" }, { }, { provider = "%<" }, {
provider = seps.full.right, provider = seps.full.right,
hl = function() hl = function(self)
local bg = self.bg_color_right
if conditions.is_active() then if conditions.is_active() then
return { fg = colors.carpYellow, bg = utils.get_highlight("StatusLine").bg } return { fg = colors.carpYellow, bg = bg }
else else
return { fg = colors.sumiInk3, bg = utils.get_highlight("StatusLineNC").bg } return { fg = colors.sumiInk3, bg = bg }
end end
end, end,
}) })
@ -535,7 +537,12 @@ return {
return { fg = colors.sumiInk4, bg = utils.get_highlight("WinBar").bg } return { fg = colors.sumiInk4, bg = utils.get_highlight("WinBar").bg }
end, end,
}, },
FileNameBlock, {
FileNameBlock,
static = {
bg_color_right = nil
}
},
margin(1), margin(1),
{ {
{ {
@ -882,15 +889,14 @@ return {
{ {
{ {
provider = seps.full.left, provider = seps.full.left,
hl = function() hl = { fg = colors.sumiInk4, bg = utils.get_highlight("StatusLine").bg }
if conditions.is_active() then
return { fg = colors.sumiInk4, bg = utils.get_highlight("StatusLine").bg }
else
return { fg = colors.sumiInk0, bg = utils.get_highlight("StatusLineNC").bg }
end
end,
}, },
FileNameBlock, {
FileNameBlock,
static = {
bg_color_right = utils.get_highlight("StatusLine").bg
}
}
}, },
margin(1), margin(1),
{ {