fix(git): refresh the gutter after staging a hunk

This commit is contained in:
2026-05-20 08:09:07 +02:00
parent b52f34ce9a
commit 01ca0025dd
2 changed files with 24 additions and 1 deletions
+7 -1
View File
@@ -599,7 +599,7 @@ end
---@param buf? integer
function M.stage_hunk(buf)
local _, state, h = cursor_hunk(buf)
local target, state, h = cursor_hunk(buf)
if not state then
return
end
@@ -616,6 +616,12 @@ function M.stage_hunk(buf)
"git apply failed: %s",
vim.trim(res.stderr or "")
)
return
end
local s = states[target]
if s then
s.index_sha = nil
schedule(target)
end
end,
})