summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-08-02 07:37:40 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-08-02 07:37:40 +1000
commit280b0429c3892efe7ff656c7e868828c5793979c (patch)
treeb0f2bfef724ad05b4bc7bc491bf30d0d553547e2
parentcb22db675a947f0697f0630254c17b59225e6289 (diff)
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.
-rw-r--r--pkg/gui/views.go2
1 files changed, 1 insertions, 1 deletions
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"},