From 429bde643e05b50ceb7974464262ec0265980a0d Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 8 Oct 2025 13:38:04 +0200 Subject: [PATCH] Refresh the main view for the current side panel when a popup is showing The logic in postRefreshUpdate would only rerender the main view if the context being updated is the current view. This is not the case when a popup is showing; but we still want to render the main view in that case, behind the popup. This happens for example when we refresh the Files scope, we determine that all conflicts have been resolved and show a popup asking to continue the merge or rebase, but the postRefreshUpdate of the Files context only happens when the popup is already showing, so we would still see the conflict markers behind the popup, which is rather confusing. --- pkg/gui/view_helpers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 081b2a426..10cb8d48b 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -157,6 +157,11 @@ func (gui *Gui) postRefreshUpdate(c types.Context) { sidePanelContext.HandleRenderToMain() } } + } else if c.GetKey() == gui.State.ContextMgr.CurrentStatic().GetKey() { + // If our view is not the current one, but it is the current static context, then this + // can only mean that a popup is showing. In that case we want to refresh the main view + // behind the popup. + c.HandleRenderToMain() } } }