From 16fde15dbf6161f99b94f56862588fee4c48fed4 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Sun, 9 Feb 2020 10:43:11 -0500 Subject: [PATCH] fix expand bug for details pane and bottom status bar --- .../layout/compound/layer_details_column.go | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/runtime/ui/layout/compound/layer_details_column.go b/runtime/ui/layout/compound/layer_details_column.go index de45f982..1941edf0 100644 --- a/runtime/ui/layout/compound/layer_details_column.go +++ b/runtime/ui/layout/compound/layer_details_column.go @@ -97,24 +97,20 @@ func (cl *LayerDetailsCompoundLayout) Layout(g *gocui.Gui, minX, minY, maxX, max if err != nil { return err } - } - } else { + return nil + } - // note: maxY needs to account for the (invisible) border, thus a +1 - header, headerErr = g.SetView(cl.details.Name()+"header", minX, detailsMinY, maxX, detailsMinY+detailsHeaderHeight+1) + } - // we are going to overlap the view over the (invisible) border (so minY will be one less than expected) - // additionally, maxY will be bumped by one to include the border - main, viewErr = g.SetView(cl.details.Name(), minX, detailsMinY+detailsHeaderHeight, maxX, maxY+1) + header, headerErr = g.SetView(cl.details.Name()+"header", minX, detailsMinY, maxX, detailsMinY+detailsHeaderHeight) + main, viewErr = g.SetView(cl.details.Name(), minX, detailsMinY+detailsHeaderHeight, maxX, maxY) - if utils.IsNewView(viewErr, headerErr) { - err := cl.details.Setup(main, header) - if err != nil { - return err - } + if utils.IsNewView(viewErr, headerErr) { + err := cl.details.Setup(main, header) + if err != nil { + return err } - } return nil