mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-08 22:52:12 +02:00
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.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user