Skip to content

Commit

Permalink
fix expand bug for details pane and bottom status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
wagoodman committed Feb 9, 2020
1 parent 8818b99 commit 16fde15
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions runtime/ui/layout/compound/layer_details_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16fde15

Please sign in to comment.