From ae24802dad9dfde97fb54117487bf49589a14e11 Mon Sep 17 00:00:00 2001 From: Ryzee119 Date: Mon, 13 Jan 2025 11:45:45 +1030 Subject: [PATCH] Fixing rendering of lines that contain a single character --- clay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clay.h b/clay.h index 064d804..2b0b4f2 100644 --- a/clay.h +++ b/clay.h @@ -1704,7 +1704,7 @@ Clay__MeasureTextCacheItem *Clay__MeasureTextCached(Clay_String *text, Clay_Text previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = start, .length = length + 1, .width = dimensions.width, .next = -1 }, previousWord); } if (current == '\n') { - if (length > 1) { + if (length >= 1) { previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = start, .length = length, .width = dimensions.width, .next = -1 }, previousWord); } previousWord = Clay__AddMeasuredWord(CLAY__INIT(Clay__MeasuredWord) { .startOffset = end + 1, .length = 0, .width = 0, .next = -1 }, previousWord);