mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 10:26:42 +10:00
fix(highlight): Normal-linked groups shouldn't override CursorLine #35026
Problem: CursorLine doesn't consistently highlight text using groups linked to Normal (e.g., in quickfix, passwd files), while it works for direct Normal usage. Solution: Don't let normal background from linked groups override explicit non-normal backgrounds during attribute combination.
This commit is contained in:
@@ -1378,6 +1378,23 @@ describe('CursorLine and CursorLineNr highlights', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('CursorLine overlays hl group linked to Normal', function()
|
||||
local screen = Screen.new(50, 12)
|
||||
screen:add_extra_attr_ids({
|
||||
[101] = { background = Screen.colors.Grey90, foreground = Screen.colors.Gray100 },
|
||||
})
|
||||
command('hi Normal guibg=black guifg=white')
|
||||
command('hi def link Test Normal')
|
||||
feed('ifoo bar<ESC>')
|
||||
feed(':call matchadd("Test", "bar")<cr>')
|
||||
command('set cursorline')
|
||||
screen:expect([[
|
||||
{21:foo }{101:ba^r}{21: }|
|
||||
{1:~ }|*10
|
||||
:call matchadd("Test", "bar") |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('CursorColumn highlight', function()
|
||||
|
||||
Reference in New Issue
Block a user