fix(highlight): make intra-line bg visible under line backgrounds (#192)
This commit is contained in:
parent
a1af48833b
commit
eccb4785ed
7 changed files with 53 additions and 41 deletions
|
|
@ -636,11 +636,20 @@ function M.highlight_hunk(bufnr, ns, hunk, opts)
|
|||
end
|
||||
|
||||
if opts.highlights.background and is_diff_line then
|
||||
local bg_end_col = raw_len or (line_len + qw)
|
||||
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, buf_line, 0, {
|
||||
line_hl_group = line_hl,
|
||||
number_hl_group = opts.highlights.gutter and number_hl or nil,
|
||||
end_row = buf_line,
|
||||
end_col = bg_end_col,
|
||||
hl_group = line_hl,
|
||||
hl_eol = true,
|
||||
priority = p.line_bg,
|
||||
})
|
||||
if opts.highlights.gutter then
|
||||
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, buf_line, 0, {
|
||||
number_hl_group = number_hl,
|
||||
priority = p.line_bg,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if is_marker and line_len > pw then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue