mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02: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
b16bb409fc
commit
a1fae41051
@ -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…
x
Reference in New Issue
Block a user