From 280b0429c3892efe7ff656c7e868828c5793979c Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 2 Aug 2023 07:37:40 +1000 Subject: [PATCH] Fix focus issue When opening lazygit with `lazygit log` the worktrees view was appearing in front of the files view. This is because it had higher precedence than the files view in the ordered view mapping, and that was because it originally was in the branches window so it was further down the list. The reason this didn't cause issues on typical startup is that the files context is activated at the start so it is brought to the front. --- pkg/gui/views.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/views.go b/pkg/gui/views.go index 9527e4392..d9cf15ffe 100644 --- a/pkg/gui/views.go +++ b/pkg/gui/views.go @@ -26,10 +26,10 @@ func (gui *Gui) orderedViewNameMappings() []viewNameMapping { {viewPtr: &gui.Views.Status, name: "status"}, {viewPtr: &gui.Views.Snake, name: "snake"}, {viewPtr: &gui.Views.Submodules, name: "submodules"}, + {viewPtr: &gui.Views.Worktrees, name: "worktrees"}, {viewPtr: &gui.Views.Files, name: "files"}, {viewPtr: &gui.Views.Tags, name: "tags"}, {viewPtr: &gui.Views.Remotes, name: "remotes"}, - {viewPtr: &gui.Views.Worktrees, name: "worktrees"}, {viewPtr: &gui.Views.Branches, name: "localBranches"}, {viewPtr: &gui.Views.RemoteBranches, name: "remoteBranches"}, {viewPtr: &gui.Views.ReflogCommits, name: "reflogCommits"},