Skip to content
Merged
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
4 changes: 4 additions & 0 deletions lua/codediff/ui/inline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ local compat = require("codediff.core.compat")
-- Dedicated namespace for inline diff (separate from side-by-side namespaces)
M.ns_inline = vim.api.nvim_create_namespace("codediff-inline")

-- Allow deleted-line virt_lines to scroll horizontally with the window
local virt_lines_overflow = vim.fn.has("nvim-0.11") == 1 and "scroll" or nil

-- Cache for merged highlight groups (syntax fg + diff bg)
local merged_hl_cache = {}

Expand Down Expand Up @@ -430,6 +433,7 @@ function M.render_inline_diff(bufnr, diff_result, original_lines, modified_lines
pcall(vim.api.nvim_buf_set_extmark, bufnr, M.ns_inline, anchor_line, 0, {
virt_lines = virt_lines,
virt_lines_above = true,
virt_lines_overflow = virt_lines_overflow,
priority = highlight_priority,
})
end
Expand Down
Loading