fix(git): close commit proxy window before deleting its buffer

This commit is contained in:
2026-04-27 17:46:01 +02:00
parent ec61dd57ed
commit 069a6cc0c6
+3 -3
View File
@@ -61,12 +61,12 @@ function M.commit(opts)
callback = done,
})
end, function(result)
if proxy_win and vim.api.nvim_win_is_valid(proxy_win) then
pcall(vim.api.nvim_win_close, proxy_win, true)
end
if proxy_buf and vim.api.nvim_buf_is_valid(proxy_buf) then
vim.api.nvim_buf_delete(proxy_buf, { force = true })
end
if proxy_win and vim.api.nvim_win_is_valid(proxy_win) then
vim.api.nvim_win_close(proxy_win, true)
end
if result.code ~= 0 then
log.error("git commit failed: %s", vim.trim(result.stderr or ""))
return