fix(highlight): apply gutter hl to prefix +/- for pw=1 diffs
Problem: for regular unified diffs, the `+`/`-` prefix char at col 0 had no diffs.nvim extmark. Native TS `@diff.plus` colored it differently from `DiffsAddNr` in the gutter. Solution: add `DiffsAddNr`/`DiffsDeleteNr` at p199 on col 0..1 when `pw == 1` and `background` is enabled. Suppresses native TS at p100.
This commit is contained in:
parent
554b465a0d
commit
23391556fd
1 changed files with 6 additions and 0 deletions
|
|
@ -612,6 +612,12 @@ function M.highlight_hunk(bufnr, ns, hunk, opts)
|
|||
})
|
||||
end
|
||||
end
|
||||
elseif opts.highlights.background and is_diff_line then
|
||||
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, buf_line, 0, {
|
||||
end_col = 1,
|
||||
hl_group = number_hl,
|
||||
priority = p.syntax,
|
||||
})
|
||||
end
|
||||
|
||||
if opts.highlights.background and is_diff_line then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue