Flow layout no longer leaves last box behind

This commit is contained in:
Sasha Koshka 2024-05-17 14:43:06 -04:00
parent 1cb9e8091e
commit 4cea0aa0bd

View File

@ -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