From 6b825b9764c3d0ebdd1c27c83c48c199c78d9f66 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 4 Nov 2020 17:18:42 +0200 Subject: Cleanup Consistent code style. --- src/ui/text.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/ui/text.c') 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) { return font - text_.fonts; } -/* Line wrapping boundaries are determined by looking at a character and the - * last character processed. We want to wrap at natural word boundaries where - * possible, so normally we wrap at a space followed a non-space character. As - * an exception, we also wrap after punctuation used to break up words, so we - * can wrap text like foo/bar/baz-abc-def.xyz at any puncation boundaries, - * without wrapping on other punctuation used for expressive purposes like - * emoticons :-) */ - iLocalDef iBool isWrapBoundary_(iChar prevC, iChar c) { - if (isSpace_Char(prevC)) + /* Line wrapping boundaries are determined by looking at a character and the + last character processed. We want to wrap at natural word boundaries where + possible, so normally we wrap at a space followed a non-space character. As + an exception, we also wrap after punctuation used to break up words, so we + can wrap text like foo/bar/baz-abc-def.xyz at any puncation boundaries, + without wrapping on other punctuation used for expressive purposes like + emoticons :-) */ + if (isSpace_Char(prevC)) { return iFalse; - - if (c == '/' || c == '-' || c == ',' || c == ';' || c == ':' || c == '.') + } + if (c == '/' || c == '-' || c == ',' || c == ';' || c == ':' || c == '.') { return iTrue; - + } return isSpace_Char(c); } -- cgit v1.2.3