refactor(diffsplit): clarify diff side API

This commit is contained in:
2026-05-29 14:22:24 +02:00
parent f0ae3fc656
commit 193616e87d
6 changed files with 262 additions and 55 deletions
+3 -5
View File
@@ -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