Skip to content

Commit

Permalink
Ensure status buffer is rerendered for cases like pushing, where no
Browse files Browse the repository at this point in the history
files change (watcher wouldn't catch it) but the state shown changes
  • Loading branch information
CKolkey committed Oct 17, 2024
1 parent 5f555a8 commit 33127ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lua/neogit/buffers/status/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,17 @@ M.n_command = function(self)

proc:show_console()

runner.call(proc, { pty = true })
runner.call(
proc,
{
pty = true,
callback = function()
if self then
self:dispatch_refresh()
end
end
}
)
end)
end

Expand Down
4 changes: 4 additions & 0 deletions lua/neogit/runner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ function M.call(process, opts)
result:remove_ansi()
end

if opts.callback then
opts.callback()
end

return result
end

Expand Down

0 comments on commit 33127ea

Please sign in to comment.