mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Change side panel width calculation to work for larger numbers
This technically is a breaking change for some existing numbers, but it stays the same for default case, and isn't much different for others
This commit is contained in:
committed by
Jesse Duffield
parent
e62aeb99ed
commit
9d0740427e
@@ -202,6 +202,86 @@ func TestGetWindowDimensions(t *testing.T) {
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "0.5 SidePanelWidth",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
args.UserConfig.Gui.SidePanelWidth = 0.5
|
||||
},
|
||||
expected: `
|
||||
╭status──────────────────────────────╮╭main───────────────────────────────╮
|
||||
│ ││ │
|
||||
╰────────────────────────────────────╯│ │
|
||||
╭files───────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰────────────────────────────────────╯│ │
|
||||
╭branches────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰────────────────────────────────────╯│ │
|
||||
╭commits─────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰────────────────────────────────────╯│ │
|
||||
╭stash───────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
╰────────────────────────────────────╯╰───────────────────────────────────╯
|
||||
<options──────────────────────────────────────────────────────>A<B────────>
|
||||
A: statusSpacer1
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "0.8 SidePanelWidth",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
args.UserConfig.Gui.SidePanelWidth = 0.8
|
||||
},
|
||||
expected: `
|
||||
╭status────────────────────────────────────────────────────╮╭main─────────╮
|
||||
│ ││ │
|
||||
╰──────────────────────────────────────────────────────────╯│ │
|
||||
╭files─────────────────────────────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰──────────────────────────────────────────────────────────╯│ │
|
||||
╭branches──────────────────────────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰──────────────────────────────────────────────────────────╯│ │
|
||||
╭commits───────────────────────────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰──────────────────────────────────────────────────────────╯│ │
|
||||
╭stash─────────────────────────────────────────────────────╮│ │
|
||||
│ ││ │
|
||||
╰──────────────────────────────────────────────────────────╯╰─────────────╯
|
||||
<options──────────────────────────────────────────────────────>A<B────────>
|
||||
A: statusSpacer1
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "half screen mode, enlargedSideViewLocation left",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
|
||||
Reference in New Issue
Block a user