fix(git): refresh the gutter after staging a hunk
This commit is contained in:
+7
-1
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user