Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
trap 'rm -rf "$tmpdir"' EXIT
printf '#!/bin/sh\nexec "%s" --cmd "set rtp+=${ts-plugin}/runtime" --cmd "set rtp+=${diff-grammar}" "$@"\n' "$nvim_bin" > "$tmpdir/nvim"
chmod +x "$tmpdir/nvim"
PATH="$tmpdir:$PATH" exec ${luaEnv}/bin/busted "$@"
NVIM_APPNAME=nvim-tmp PATH="$tmpdir:$PATH" exec ${luaEnv}/bin/busted "$@"
'';
in
pkgs.mkShell {
Expand Down
12 changes: 10 additions & 2 deletions lua/diffs/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -636,11 +636,19 @@ function M.highlight_hunk(bufnr, ns, hunk, opts)
end

if opts.highlights.background and is_diff_line then
-- NOTE: must use separate extmark here https://github.com/neovim/neovim/issues/31151
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 + 1,
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
Expand Down
Loading