diff options
Diffstat (limited to 'src')
-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 | ||