mirror of
https://github.com/neovim/neovim
synced 2025-07-20 13:22:26 +00:00
fix(highlight): combine ColorColumn with low-priority CursorLine (#23017)
This commit is contained in:
@ -2668,7 +2668,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
|
|||||||
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol) {
|
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol) {
|
||||||
col_attr = cuc_attr;
|
col_attr = cuc_attr;
|
||||||
} else if (draw_color_col && VCOL_HLC == *color_cols) {
|
} else if (draw_color_col && VCOL_HLC == *color_cols) {
|
||||||
col_attr = mc_attr;
|
col_attr = hl_combine_attr(wlv.line_attr_lowprio, mc_attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
col_attr = hl_combine_attr(col_attr, wlv.line_attr);
|
col_attr = hl_combine_attr(col_attr, wlv.line_attr);
|
||||||
|
@ -1411,10 +1411,10 @@ describe('ColorColumn highlight', function()
|
|||||||
[3] = {foreground = Screen.colors.Brown}, -- LineNr
|
[3] = {foreground = Screen.colors.Brown}, -- LineNr
|
||||||
[4] = {foreground = Screen.colors.Brown, bold = true}, -- CursorLineNr
|
[4] = {foreground = Screen.colors.Brown, bold = true}, -- CursorLineNr
|
||||||
[5] = {foreground = Screen.colors.Blue, bold = true}, -- NonText
|
[5] = {foreground = Screen.colors.Blue, bold = true}, -- NonText
|
||||||
-- NonText and ColorColumn
|
|
||||||
[6] = {foreground = Screen.colors.Blue, background = Screen.colors.LightRed, bold = true},
|
[6] = {foreground = Screen.colors.Blue, background = Screen.colors.LightRed, bold = true},
|
||||||
[7] = {reverse = true, bold = true}, -- StatusLine
|
[7] = {reverse = true, bold = true}, -- StatusLine
|
||||||
[8] = {reverse = true}, -- StatusLineNC
|
[8] = {reverse = true}, -- StatusLineNC
|
||||||
|
[9] = {background = Screen.colors.Grey90, foreground = Screen.colors.Red},
|
||||||
})
|
})
|
||||||
screen:attach()
|
screen:attach()
|
||||||
end)
|
end)
|
||||||
@ -1500,6 +1500,25 @@ describe('ColorColumn highlight', function()
|
|||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('is combined with low-priority CursorLine highlight #23016', function()
|
||||||
|
screen:try_resize(40, 2)
|
||||||
|
command('set colorcolumn=30 cursorline')
|
||||||
|
screen:expect([[
|
||||||
|
{2:^ }{1: }{2: }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
command('hi clear ColorColumn')
|
||||||
|
screen:expect([[
|
||||||
|
{2:^ }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
command('hi ColorColumn guifg=Red')
|
||||||
|
screen:expect([[
|
||||||
|
{2:^ }{9: }{2: }|
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe("MsgSeparator highlight and msgsep fillchar", function()
|
describe("MsgSeparator highlight and msgsep fillchar", function()
|
||||||
|
Reference in New Issue
Block a user