Skip to content

Commit

Permalink
cap the layers view based on the available terminal real estate
Browse files Browse the repository at this point in the history
  • Loading branch information
wagoodman committed Oct 29, 2018
1 parent fac24be commit e7a05d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/ui.go
Expand Up @@ -191,6 +191,10 @@ func layout(g *gocui.Gui) error {
filterBarIndex := 2

layersHeight := len(Views.Layer.Layers) + headerRows + 1 // layers + header + base image layer row
maxLayerHeight := int(0.75 * float64(maxY))
if layersHeight > maxLayerHeight {
layersHeight = maxLayerHeight
}

var view, header *gocui.View
var viewErr, headerErr, err error
Expand Down

0 comments on commit e7a05d4

Please sign in to comment.