1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

Add user config expandedSidePanelWeight

This commit is contained in:
Stefan Haller
2024-05-31 21:37:10 +02:00
parent 557dfc5a6d
commit 1269938ee6
5 changed files with 55 additions and 1 deletions

View File

@@ -443,7 +443,7 @@ func sidePanelChildren(args WindowArrangementArgs) func(width int, height int) [
if accordionMode && defaultBox.Window == args.CurrentSideWindow {
return &boxlayout.Box{
Window: defaultBox.Window,
Weight: 2,
Weight: args.UserConfig.Gui.ExpandedSidePanelWeight,
}
}

View File

@@ -161,6 +161,47 @@ func TestGetWindowDimensions(t *testing.T) {
B: information
`,
},
{
name: "expandSidePanelWeight",
mutateArgs: func(args *WindowArrangementArgs) {
args.UserConfig.Gui.ExpandFocusedSidePanel = true
args.UserConfig.Gui.ExpandedSidePanelWeight = 4
},
expected: `
╭status─────────────────╮╭main────────────────────────────────────────────╮
│ ││ │
╰───────────────────────╯│ │
╭files──────────────────╮│ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
╰───────────────────────╯│ │
╭branches───────────────╮│ │
│ ││ │
│ ││ │
╰───────────────────────╯│ │
╭commits────────────────╮│ │
│ ││ │
│ ││ │
╰───────────────────────╯│ │
╭stash──────────────────╮│ │
│ ││ │
╰───────────────────────╯╰────────────────────────────────────────────────╯
<options──────────────────────────────────────────────────────>A<B────────>
A: statusSpacer1
B: information
`,
},
{
name: "half screen mode, enlargedSideViewLocation left",
mutateArgs: func(args *WindowArrangementArgs) {