diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-05 16:47:14 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-05 16:47:14 +0300 |
commit | 8cdebce00959705de94295bdbb4b32ec08fc4b70 (patch) | |
tree | 0255a4c46e89c85fdaa0f04b2cb5980f4d345645 | |
parent | e242cee1974fc265e005d05f8849af9f2cfb9483 (diff) |
Text: Minor optimization
No need to check for word boundaries if wrapping is not being checked for.
-rw-r--r-- | src/ui/text.c | 2 |
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. */ |