Skip to content

Commit

Permalink
fix filetree attribute header
Browse files Browse the repository at this point in the history
  • Loading branch information
wagoodman committed Dec 17, 2019
1 parent 8c6a7ce commit b68bce1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/ui/view/filetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit b68bce1

Please sign in to comment.