diff options
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 977cac9c..4a4b3776 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -1871,7 +1871,7 @@ iInt2 tryAdvance_Text(int fontId, iRangecc text, int width, const char **endPos) | |||
1871 | } | 1871 | } |
1872 | 1872 | ||
1873 | iInt2 tryAdvanceNoWrap_Text(int fontId, iRangecc text, int width, const char **endPos) { | 1873 | iInt2 tryAdvanceNoWrap_Text(int fontId, iRangecc text, int width, const char **endPos) { |
1874 | if (width <= 1) { | 1874 | if (width && width <= 1) { |
1875 | *endPos = text.start; | 1875 | *endPos = text.start; |
1876 | return zero_I2(); | 1876 | return zero_I2(); |
1877 | } | 1877 | } |
@@ -2070,7 +2070,7 @@ iTextMetrics draw_WrapText(iWrapText *d, int fontId, iInt2 pos, int color) { | |||
2070 | const int width = d->mode == word_WrapTextMode | 2070 | const int width = d->mode == word_WrapTextMode |
2071 | ? tryAdvance_Text(fontId, text, d->maxWidth, &endPos).x | 2071 | ? tryAdvance_Text(fontId, text, d->maxWidth, &endPos).x |
2072 | : tryAdvanceNoWrap_Text(fontId, text, d->maxWidth, &endPos).x; | 2072 | : tryAdvanceNoWrap_Text(fontId, text, d->maxWidth, &endPos).x; |
2073 | notify_WrapText_(d, endPos, (iTextAttrib){ .colorId = color }, 0, width); | 2073 | notify_WrapText_(d, endPos, (iTextAttrib){ .fgColorId = color }, 0, width); |
2074 | drawRange_Text(fontId, pos, color, (iRangecc){ text.start, endPos }); | 2074 | drawRange_Text(fontId, pos, color, (iRangecc){ text.start, endPos }); |
2075 | text.start = endPos; | 2075 | text.start = endPos; |
2076 | pos.y += lineHeight_Text(fontId); | 2076 | pos.y += lineHeight_Text(fontId); |