From 0bf1229a66283d63972dd1c3124c2d020f9ea24c Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Mar 2026 13:16:41 -0500 Subject: [PATCH] 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. --- lua/diffs/highlight.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/diffs/highlight.lua b/lua/diffs/highlight.lua index 8957394..dedc24e 100644 --- a/lua/diffs/highlight.lua +++ b/lua/diffs/highlight.lua @@ -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, })