Update diff of conflicted file in the main view after conflicts have been resolved (#4945)

When lazygit detects that all conflicts have been resolved, it puts up a
popup asking whether the user wants to continue the merge or rebase.
However, it didn't rerender the main view of the conflicted file, so it
would still show the conflict markers, which is confusing. Add some
logic that updates the main view in this situation, behind the popup.
This commit is contained in:
Stefan Haller 2025-10-09 09:04:32 +02:00 committed by GitHub
commit fb00584f4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}
}
}