1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-06-20 01:19:23 +02:00

Make the remote-branches view follow its parent's window

The remote-branches context is a transient guest that takes over a host
window when you drill into a remote. SubCommits and CommitFiles already
adopt their parent's window via SetWindowName when shown; RemoteBranches
relied instead on its static window name ("branches") matching the remotes
context's window. That assumption only holds while remotes lives in the
branches panel. Adopt the parent's window like the other transient guests
so remote branches render in the right place once panels are configurable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Haller
2026-06-14 08:30:52 +02:00
parent e88fc1331a
commit b71ae11c20
@@ -140,6 +140,7 @@ func (self *RemotesController) enter(remote *models.Remote) error {
remoteBranchesContext.SetSelection(newSelectedLine)
remoteBranchesContext.SetTitleRef(remote.Name)
remoteBranchesContext.SetParentContext(self.Context())
remoteBranchesContext.SetWindowName(self.Context().GetWindowName())
remoteBranchesContext.GetView().TitlePrefix = self.Context().GetView().TitlePrefix
self.c.PostRefreshUpdate(remoteBranchesContext)