Skip to content

Commit e61b334

Browse files
committed
fix(diff): make diffview work again. Fixes #304
1 parent 62214df commit e61b334

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/lazy/view/diff.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ M.handlers = {
2323

2424
---@type LazyDiffFun
2525
["diffview.nvim"] = function(plugin, diff)
26+
local args
2627
if diff.commit then
27-
vim.cmd.DiffviewOpen(("-C=%s"):format(plugin.dir) .. " " .. diff.commit)
28+
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.commit
2829
else
29-
vim.cmd.DiffviewOpen(("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to)
30+
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to
3031
end
32+
vim.cmd("DiffviewOpen " .. args)
3133
end,
3234

3335
---@type LazyDiffFun

0 commit comments

Comments
 (0)