fix filetree attribute header

This commit is contained in:
Alex Goodman 2019-12-16 22:19:59 -05:00
parent 8c6a7ce973
commit b68bce154a
No known key found for this signature in database
GPG Key ID: 98AF011C5C78EB7E

View File

@ -404,11 +404,11 @@ func (v *FileTree) KeyHelp() string {
func (v *FileTree) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error {
logrus.Tracef("view.Layout(minX: %d, minY: %d, maxX: %d, maxY: %d) %s", minX, minY, maxX, maxY, v.Name())
attributeRowSize := 0
if !v.areAttributesVisible() {
if v.areAttributesVisible() {
attributeRowSize = 1
}
// header + attribute + border
headerSize := 1 + attributeRowSize + 1
// header + attribute header
headerSize := 1 + attributeRowSize
// note: maxY needs to account for the (invisible) border, thus a +1
header, headerErr := g.SetView(v.Name()+"header", minX, minY, maxX, minY+headerSize+1)
// we are going to overlap the view over the (invisible) border (so minY will be one less than expected).