Skip to content

Commit 429bde6

Browse files
committed
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.
1 parent 97762f4 commit 429bde6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/gui/view_helpers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ func (gui *Gui) postRefreshUpdate(c types.Context) {
157157
sidePanelContext.HandleRenderToMain()
158158
}
159159
}
160+
} else if c.GetKey() == gui.State.ContextMgr.CurrentStatic().GetKey() {
161+
// If our view is not the current one, but it is the current static context, then this
162+
// can only mean that a popup is showing. In that case we want to refresh the main view
163+
// behind the popup.
164+
c.HandleRenderToMain()
160165
}
161166
}
162167
}

0 commit comments

Comments
 (0)