fix(highlight): extend prefix DiffsClear to cover quote and prefix width

Problem: in email-quoted diffs (qw > 0), the body prefix DiffsClear only
covered col 0..qw (the quote prefix). The diff prefix marker column at
col qw..pw+qw had no DiffsClear, leaving a 1-column gap where native
treesitter background could bleed through on context lines.

Solution: extend body prefix DiffsClear end_col from qw to pw + qw,
covering both the quote prefix and the diff prefix marker. On +/- lines
this was already masked by DiffsAdd/DiffsDelete at higher priority, but
context lines (prefix ' ') had no such mask.

Closes #142 issue 1.
This commit is contained in:
Barrett Ruth 2026-03-04 13:16:41 -05:00
parent d7ee488ef3
commit 0bf1229a66
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -480,7 +480,7 @@ function M.highlight_hunk(bufnr, ns, hunk, opts)
if qw > 0 then
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, buf_line, 0, {
end_col = qw,
end_col = pw + qw,
hl_group = 'DiffsClear',
priority = p.clear,
})