summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 16:47:14 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 16:47:14 +0300
commit8cdebce00959705de94295bdbb4b32ec08fc4b70 (patch)
tree0255a4c46e89c85fdaa0f04b2cb5980f4d345645 /src/ui
parente242cee1974fc265e005d05f8849af9f2cfb9483 (diff)
Text: Minor optimization
No need to check for word boundaries if wrapping is not being checked for.
Diffstat (limited to 'src/ui')
-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 e14a679e..2cb4d6ac 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 (mode == measureNoWrap_RunMode || isWrapBoundary_(prevCh, ch)) { 546 if (continueFrom_out && isWrapBoundary_(prevCh, ch)) {
547 lastWordEnd = chPos; 547 lastWordEnd = chPos;
548 } 548 }
549 /* Check the next character. */ 549 /* Check the next character. */