diff options
| -rw-r--r-- | grid.go | 6 | ||||
| -rw-r--r-- | stack.go | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -188,7 +188,11 @@ _=ymargin if current != nil { // connect first left to first right current.neighbor = c } - current = as[0] // next left is first subwidget + if len(as) != 0 { + current = as[0] // next left is first subwidget + } else { + current = nil // spaces don't have allocation data + } allocations = append(allocations, as...) x += g.colwidths[col] } @@ -133,7 +133,11 @@ _=ymargin if current != nil { // connect first left to first right current.neighbor = c } - current = as[0] // next left is first subwidget + if len(as) != 0 { + current = as[0] // next left is first subwidget + } else { + current = nil // spaces don't have allocation data + } } allocations = append(allocations, as...) if s.orientation == horizontal { |
