mirror of https://github.com/folke/lazy.nvim.git
fix(diff): make diffview work again. Fixes #304
This commit is contained in:
parent
62214df989
commit
e61b334cee
|
@ -23,11 +23,13 @@ M.handlers = {
|
||||||
|
|
||||||
---@type LazyDiffFun
|
---@type LazyDiffFun
|
||||||
["diffview.nvim"] = function(plugin, diff)
|
["diffview.nvim"] = function(plugin, diff)
|
||||||
|
local args
|
||||||
if diff.commit then
|
if diff.commit then
|
||||||
vim.cmd.DiffviewOpen(("-C=%s"):format(plugin.dir) .. " " .. diff.commit)
|
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.commit
|
||||||
else
|
else
|
||||||
vim.cmd.DiffviewOpen(("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to)
|
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to
|
||||||
end
|
end
|
||||||
|
vim.cmd("DiffviewOpen " .. args)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
---@type LazyDiffFun
|
---@type LazyDiffFun
|
||||||
|
|
Loading…
Reference in New Issue