mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Fix bug where worktree view would take over window upon switching branches
When switching worktrees (which we can now do via the branch view) we re-layout the windows and their views. We had the worktree view ahead of the file view based on the Flatten() method in context.go, because it used to be associated with the branches panel.
This commit is contained in:
parent
c9a19f0fbc
commit
72ec7922ac
|
|
@ -124,10 +124,10 @@ func (self *ContextTree) Flatten() []types.Context {
|
|||
self.Status,
|
||||
self.Snake,
|
||||
self.Submodules,
|
||||
self.Worktrees,
|
||||
self.Files,
|
||||
self.SubCommits,
|
||||
self.Remotes,
|
||||
self.Worktrees,
|
||||
self.RemoteBranches,
|
||||
self.Tags,
|
||||
self.Branches,
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ var AddFromBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Lines(
|
||||
Contains("mybranch").IsSelected(),
|
||||
Contains("newbranch (worktree)"),
|
||||
)
|
||||
).
|
||||
// Confirm the files view is still showing in the files window
|
||||
Press(keys.Universal.PrevBlock)
|
||||
|
||||
t.Views().Files().
|
||||
IsFocused()
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue