refactor(git): drive :G dispatch from buffer content

This commit is contained in:
2026-05-08 00:27:02 +02:00
parent c543f0a7ba
commit 715e47d449
9 changed files with 120 additions and 295 deletions
+5 -3
View File
@@ -28,11 +28,13 @@ function M.commit(opts)
f:close()
end
local buf, win = util.new_scratch({ name = file_path })
local buf, win = util.new_scratch({
name = file_path,
buftype = "acwrite",
modifiable = true,
})
proxy_buf = buf
proxy_win = win
vim.bo[buf].buftype = "acwrite"
vim.bo[buf].modifiable = true
vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines)
vim.bo[buf].modified = false
vim.bo[buf].filetype = "gitcommit"