refactor(git): rewrite diff module around :diffsplit
This commit is contained in:
+6
-1
@@ -334,7 +334,12 @@ local function open_section(r, section)
|
||||
local left = side_buf(r, section.blob_a, section.path_a)
|
||||
local right = side_buf(r, section.blob_b, section.path_b)
|
||||
if left and right then
|
||||
require("git.diff").open(left, right, true)
|
||||
vim.cmd.normal({ "m'", bang = true })
|
||||
vim.api.nvim_set_current_buf(right)
|
||||
require("git.diff").split({
|
||||
target = vim.api.nvim_buf_get_name(left),
|
||||
mods = { vertical = true },
|
||||
})
|
||||
return
|
||||
end
|
||||
if not left and not right then
|
||||
|
||||
Reference in New Issue
Block a user