diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-04 17:18:42 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-04 17:18:42 +0200 |
commit | 6b825b9764c3d0ebdd1c27c83c48c199c78d9f66 (patch) | |
tree | 97b00b5c6add6600b55bffd6a34bd80141167ace /src/ui | |
parent | eda5c2dc976f2d02cee5c8dc2feaa2d824d40c79 (diff) |
Cleanup
Consistent code style.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/text.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index f998688a..a72d9e4f 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -586,21 +586,20 @@ static enum iFontId fontId_Text_(const iFont *font) { | |||
586 | return font - text_.fonts; | 586 | return font - text_.fonts; |
587 | } | 587 | } |
588 | 588 | ||
589 | /* Line wrapping boundaries are determined by looking at a character and the | ||
590 | * last character processed. We want to wrap at natural word boundaries where | ||
591 | * possible, so normally we wrap at a space followed a non-space character. As | ||
592 | * an exception, we also wrap after punctuation used to break up words, so we | ||
593 | * can wrap text like foo/bar/baz-abc-def.xyz at any puncation boundaries, | ||
594 | * without wrapping on other punctuation used for expressive purposes like | ||
595 | * emoticons :-) */ | ||
596 | |||
597 | iLocalDef iBool isWrapBoundary_(iChar prevC, iChar c) { | 589 | iLocalDef iBool isWrapBoundary_(iChar prevC, iChar c) { |
598 | if (isSpace_Char(prevC)) | 590 | /* Line wrapping boundaries are determined by looking at a character and the |
591 | last character processed. We want to wrap at natural word boundaries where | ||
592 | possible, so normally we wrap at a space followed a non-space character. As | ||
593 | an exception, we also wrap after punctuation used to break up words, so we | ||
594 | can wrap text like foo/bar/baz-abc-def.xyz at any puncation boundaries, | ||
595 | without wrapping on other punctuation used for expressive purposes like | ||
596 | emoticons :-) */ | ||
597 | if (isSpace_Char(prevC)) { | ||
599 | return iFalse; | 598 | return iFalse; |
600 | 599 | } | |
601 | if (c == '/' || c == '-' || c == ',' || c == ';' || c == ':' || c == '.') | 600 | if (c == '/' || c == '-' || c == ',' || c == ';' || c == ':' || c == '.') { |
602 | return iTrue; | 601 | return iTrue; |
603 | 602 | } | |
604 | return isSpace_Char(c); | 603 | return isSpace_Char(c); |
605 | } | 604 | } |
606 | 605 | ||