Skip to content

Commit

Permalink
fix(diff): make diffview work again. Fixes #304
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 4, 2023
1 parent 62214df commit e61b334
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/lazy/view/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e61b334

Please sign in to comment.