From f9b958441d2fcfe4a3a9350a83772700295a4a9c Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 15 Nov 2026 16:35:10 +0100 Subject: [PATCH] Extract the size of the info section into a function The size of the side panels will depend on the height of the screen without the info section. Co-Authored-By: Claude Opus 5.5 --- .../helpers/window_arrangement_helper.go | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkg/gui/controllers/helpers/window_arrangement_helper.go b/pkg/gui/controllers/helpers/window_arrangement_helper.go index fc08d00a9..bf55db79e 100644 --- a/pkg/gui/controllers/helpers/window_arrangement_helper.go +++ b/pkg/gui/controllers/helpers/window_arrangement_helper.go @@ -141,15 +141,6 @@ func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimens sidePanelsDirection = boxlayout.ROW } - showInfoSection := args.UserConfig.Gui.ShowBottomLine || - args.InSearchPrompt || - args.IsAnyModeActive || - args.AppStatus != "" - infoSectionSize := 0 - if showInfoSection { - infoSectionSize = 1 - } - root := &boxlayout.Box{ Direction: boxlayout.ROW, Children: []*boxlayout.Box{ @@ -171,7 +162,7 @@ func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimens }, { Direction: boxlayout.COLUMN, - Size: infoSectionSize, + Size: infoSectionSize(args), Children: infoSectionChildren(args), }, }, @@ -295,6 +286,17 @@ func getMidSectionWeights(args WindowArrangementArgs) (int, int) { return sideSectionWeight, mainSectionWeight } +func infoSectionSize(args WindowArrangementArgs) int { + showInfoSection := args.UserConfig.Gui.ShowBottomLine || + args.InSearchPrompt || + args.IsAnyModeActive || + args.AppStatus != "" + if showInfoSection { + return 1 + } + return 0 +} + func infoSectionChildren(args WindowArrangementArgs) []*boxlayout.Box { if args.InSearchPrompt { return []*boxlayout.Box{