From 33127ea31abd8775d1178c0cf89a4db089ee3e9e Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 17 Oct 2024 22:27:37 +0200 Subject: [PATCH] Ensure status buffer is rerendered for cases like pushing, where no files change (watcher wouldn't catch it) but the state shown changes --- lua/neogit/buffers/status/actions.lua | 12 +++++++++++- lua/neogit/runner.lua | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/neogit/buffers/status/actions.lua b/lua/neogit/buffers/status/actions.lua index 461e6f97f..6dff99b97 100644 --- a/lua/neogit/buffers/status/actions.lua +++ b/lua/neogit/buffers/status/actions.lua @@ -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 diff --git a/lua/neogit/runner.lua b/lua/neogit/runner.lua index f79140f23..76d5b3f88 100644 --- a/lua/neogit/runner.lua +++ b/lua/neogit/runner.lua @@ -155,6 +155,10 @@ function M.call(process, opts) result:remove_ansi() end + if opts.callback then + opts.callback() + end + return result end