From cf1adec04d7c6e0f05e67b7700be485f016fe038 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 20 Dec 2020 07:37:35 +0200 Subject: Cleanup --- src/ui/text.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ui/text.c') diff --git a/src/ui/text.c b/src/ui/text.c index 2dd778fd..0f511adb 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -693,7 +693,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { /* We don't have the composited Emojis. */ if (isEmoji_Char(prevCh)) { /* skip */ - ch = nextChar_(&chPos, args->text.end); + nextChar_(&chPos, args->text.end); ch = nextChar_(&chPos, args->text.end); } } @@ -776,11 +776,13 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { int x2 = x1 + glyph->rect[hoff].size.x; /* Out of the allotted space? */ if (args->xposLimit > 0 && x2 > args->xposLimit) { - if (lastWordEnd != args->text.start) { - *args->continueFrom_out = lastWordEnd; - } - else { - *args->continueFrom_out = currentPos; /* forced break */ + if (args->continueFrom_out) { + if (lastWordEnd != args->text.start) { + *args->continueFrom_out = lastWordEnd; + } + else { + *args->continueFrom_out = currentPos; /* forced break */ + } } break; } -- cgit v1.2.3