Skip to content

Commit

Permalink
fix(color): follow linked hl groups
Browse files Browse the repository at this point in the history
Without 'link = false' (default is true), the returned attributes are
the ones of the source highlight group, not of the target highlight
group. This behaviour doesn't match the way Neovim renders highlighted
text.
  • Loading branch information
antoineco committed Apr 23, 2023
1 parent 0cd505b commit e6e7cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/bufferline/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
local new_hl_api = api.nvim_get_hl ~= nil
local get_hl = function(name, use_cterm)
if new_hl_api then
local hl = api.nvim_get_hl(0, { name = name })
local hl = api.nvim_get_hl(0, { name = name, link = false })
if use_cterm then
hl.fg, hl.bg = hl.ctermfg, hl.ctermbg
end
Expand Down

0 comments on commit e6e7cc4

Please sign in to comment.