diff --git a/layouts/flow.go b/layouts/flow.go index 8baa762..3790dd3 100644 --- a/layouts/flow.go +++ b/layouts/flow.go @@ -43,7 +43,7 @@ func (flow Flow) Arrange (hints tomo.LayoutHints, boxes []tomo.Box) { for index < len(boxes) { // get a slice of boxes for this major step stepIndexEnd := index + minorSteps - if stepIndexEnd >= len(boxes) { stepIndexEnd = len(boxes) - 1 } + if stepIndexEnd > len(boxes) { stepIndexEnd = len(boxes) } step := boxes[index:stepIndexEnd] index += minorSteps