Skip to content

Commit

Permalink
Line breaking logic fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
diniska committed Dec 8, 2022
2 parents 530e1d2 + aaf1418 commit 1e6b0ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/WrappingStack/WrappingHStack.swift
Expand Up @@ -71,10 +71,10 @@ public struct WrappingHStack<Data: RandomAccessCollection, ID: Hashable, Content
width = newWidth + horizontalSpacing
lineLength += 1
} else {
width = elementWidth
width = elementWidth + horizontalSpacing
let lineEnd = data.index(lineStart, offsetBy:lineLength)
result.append(lineStart ..< lineEnd)
lineLength = 0
lineLength = 1
lineStart = lineEnd
}
}
Expand Down

0 comments on commit 1e6b0ff

Please sign in to comment.