Skip to content

Commit b1450b6

Browse files
committed
Remembered
1 parent ee7024d commit b1450b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/CodeEditTextView/TextLine/TextLine.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ public final class TextLine: Identifiable, Equatable {
3636
// Both max widths we're comparing are finite
3737
maxWidth.isFinite
3838
&& (self.maxWidth ?? 0.0).isFinite
39-
// The new max width is less than the required space, so we need to layout again.
40-
&& maxWidth < (self.maxWidth ?? 0.0)
39+
// We can't use `<` here because we want to calculate layout again if this was previously constrained to a
40+
// small layout size and needs to grow.
41+
&& maxWidth != (self.maxWidth ?? 0.0)
4142
)
4243
}
4344

0 commit comments

Comments
 (0)