refactor(diffsplit): clarify diff side API
This commit is contained in:
+3
-5
@@ -395,11 +395,9 @@ local function open_section(r, commit, section)
|
||||
local left = side(r, commit, true, section.blob_a, section.path_a)
|
||||
local right = side(r, commit, false, section.blob_b, section.path_b)
|
||||
if left and right then
|
||||
vim.cmd.normal({ "m'", bang = true })
|
||||
vim.api.nvim_set_current_buf(right)
|
||||
require("git.diffsplit").open({
|
||||
target = vim.api.nvim_buf_get_name(left),
|
||||
mods = { vertical = true },
|
||||
require("git.diffsplit").open_pair(left, right, {
|
||||
layout = "vertical",
|
||||
focus = "new",
|
||||
})
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user