Skip to content

Commit c02db35

Browse files
authored
[Bug] Fix NEWLINES wrap mode not being respected correctly (#36)
1 parent 2cf212e commit c02db35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ void Clay__CalculateFinalLayout() {
19681968
.length = 0,
19691969
};
19701970
// Short circuit all wrap calculations if wrap mode is none
1971-
if (textConfig->wrapMode == CLAY_TEXT_WRAP_NONE || (containerElement->dimensions.width == textElementData->preferredDimensions.width)) {
1971+
if (textConfig->wrapMode == CLAY_TEXT_WRAP_NONE || (containerElement->dimensions.width == textElementData->preferredDimensions.width && textConfig->wrapMode != CLAY_TEXT_WRAP_NEWLINES)) {
19721972
Clay_LayoutElementArray_Add(&Clay__layoutElements, CLAY__INIT(Clay_LayoutElement) {
19731973
.text = text,
19741974
.dimensions = textElementData->preferredDimensions,

0 commit comments

Comments
 (0)