fix(git): close commit proxy window before deleting its buffer
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user