summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 17:34:46 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 17:35:50 +0300
commitb557188c664184a4adb34d81d69d02384747f64d (patch)
treee16bb0b75d928128f736cafc622364d9d8608824 /src
parentb92be19c8fc805c82bddb6058b728f8b2e7d28af (diff)
Text: Fixed the minor optimization
Diffstat (limited to 'src')
-rw-r--r--src/ui/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index 2cb4d6ac..f0fc9976 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -543,7 +543,7 @@ static iRect run_Font_(iFont *d, enum iRunMode mode, iRangecc text, size_t maxLe
543 is monospaced. */ 543 is monospaced. */
544 xpos += (d->isMonospaced && glyph->font != d ? monoAdvance : glyph->advance); 544 xpos += (d->isMonospaced && glyph->font != d ? monoAdvance : glyph->advance);
545 xposMax = iMax(xposMax, xpos); 545 xposMax = iMax(xposMax, xpos);
546 if (continueFrom_out && isWrapBoundary_(prevCh, ch)) { 546 if (continueFrom_out && (mode == measureNoWrap_RunMode || isWrapBoundary_(prevCh, ch))) {
547 lastWordEnd = chPos; 547 lastWordEnd = chPos;
548 } 548 }
549 /* Check the next character. */ 549 /* Check the next character. */