1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 11:30:06 +08:00

perf(git): notify commit done when use -m

This commit is contained in:
Eric Wong 2024-03-03 23:12:52 +08:00
parent 54072389a9
commit f80b8fd88e

View File

@ -30,9 +30,13 @@ local function on_stderr(id, data)
end
local function on_exit(id, code, single)
-- log.debug(string.format('code %d, single %d', code, single))
if id ~= commit_jobid then
return
end
if code == 0 and single == 0 then
nt.notify('commit done!')
end
if commit_bufnr ~= -1 and vim.api.nvim_buf_is_valid(commit_bufnr) then
vim.api.nvim_buf_set_lines(commit_bufnr, 0, -1, false, commit_context)
end