fix(diff): make diffview work again. Fixes #304

This commit is contained in:
Folke Lemaitre 2023-01-04 08:13:43 +01:00
parent 62214df989
commit e61b334cee
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 4 additions and 2 deletions

View File

@ -23,11 +23,13 @@ M.handlers = {
---@type LazyDiffFun
["diffview.nvim"] = function(plugin, diff)
local args
if diff.commit then
vim.cmd.DiffviewOpen(("-C=%s"):format(plugin.dir) .. " " .. diff.commit)
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.commit
else
vim.cmd.DiffviewOpen(("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to)
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to
end
vim.cmd("DiffviewOpen " .. args)
end,
---@type LazyDiffFun