1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

feat: let the staging secondary panel change view mode

This commit is contained in:
AzraelSec
2024-06-05 02:52:11 +02:00
committed by Stefan Haller
parent 03a075c223
commit 06496ccd17
3 changed files with 58 additions and 1 deletions

View File

@ -216,6 +216,15 @@ func mainSectionChildren(args WindowArrangementArgs) []*boxlayout.Box {
}
}
if args.CurrentWindow == "secondary" && args.ScreenMode == types.SCREEN_FULL {
return []*boxlayout.Box{
{
Window: "secondary",
Weight: 1,
},
}
}
return []*boxlayout.Box{
{
Window: "main",
@ -239,7 +248,7 @@ func getMidSectionWeights(args WindowArrangementArgs) (int, int) {
mainSectionWeight = 5 // need to shrink side panel to make way for main panels if side-by-side
}
if args.CurrentWindow == "main" {
if args.CurrentWindow == "main" || args.CurrentWindow == "secondary" {
if args.ScreenMode == types.SCREEN_HALF || args.ScreenMode == types.SCREEN_FULL {
sideSectionWeight = 0
}