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:
Barrett Ruth 2026-03-08 14:34:44 -04:00
parent 554b465a0d
commit 23391556fd
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -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