Skip to content

Commit

Permalink
fix: use link if specified in custom areas (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackielii authored Dec 6, 2023
1 parent 1a33975 commit 9ca364d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/bufferline/custom_area.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ local fmt = string.format
---generate a custom highlight group
---@param index integer
---@param side string
---@param section {fg: string, bg: string, text: string}
---@param section {fg: string, bg: string, text: string, link: string}
---@param bg string?
local function create_hl(index, side, section, bg)
if section.link then
return highlights.hl(section.link)
end
local name = fmt("BufferLine%sCustomAreaText%d", side:gsub("^%l", string.upper), index)
section.bg = section.bg or bg
section.default = true -- We need to be able to constantly override these highlights so they should always be default
Expand Down

0 comments on commit 9ca364d

Please sign in to comment.