summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-20 07:37:35 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-20 07:37:35 +0200
commitcf1adec04d7c6e0f05e67b7700be485f016fe038 (patch)
tree172004aa8d960f08930d6c778d6ce277cb846cc1 /src/ui
parentb20ba0c5260d26f688fe843a68ac2ffbea6b0f07 (diff)
Cleanup
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/text.c14
1 files changed, 8 insertions, 6 deletions
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) {
693 /* We don't have the composited Emojis. */ 693 /* We don't have the composited Emojis. */
694 if (isEmoji_Char(prevCh)) { 694 if (isEmoji_Char(prevCh)) {
695 /* skip */ 695 /* skip */
696 ch = nextChar_(&chPos, args->text.end); 696 nextChar_(&chPos, args->text.end);
697 ch = nextChar_(&chPos, args->text.end); 697 ch = nextChar_(&chPos, args->text.end);
698 } 698 }
699 } 699 }
@@ -776,11 +776,13 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) {
776 int x2 = x1 + glyph->rect[hoff].size.x; 776 int x2 = x1 + glyph->rect[hoff].size.x;
777 /* Out of the allotted space? */ 777 /* Out of the allotted space? */
778 if (args->xposLimit > 0 && x2 > args->xposLimit) { 778 if (args->xposLimit > 0 && x2 > args->xposLimit) {
779 if (lastWordEnd != args->text.start) { 779 if (args->continueFrom_out) {
780 *args->continueFrom_out = lastWordEnd; 780 if (lastWordEnd != args->text.start) {
781 } 781 *args->continueFrom_out = lastWordEnd;
782 else { 782 }
783 *args->continueFrom_out = currentPos; /* forced break */ 783 else {
784 *args->continueFrom_out = currentPos; /* forced break */
785 }
784 } 786 }
785 break; 787 break;
786 } 788 }