From 4cea0aa0bd948636d88de0123d8ab9e9162f8773 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 17 May 2024 14:43:06 -0400 Subject: [PATCH] Flow layout no longer leaves last box behind --- layouts/flow.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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