diff options
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index d3e6fd8f79c..2c9ea1d6afa 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -285,7 +285,7 @@ void wrap_offset( end += max; chop = 1; } - else if (ch == ' ' || ch == '-') { + else if (ELEM(ch, ' ', '-')) { end = i + 1; chop = 0; if (linep == linein && i >= cursin) { @@ -362,7 +362,7 @@ void wrap_offset_in_line( end += max; chop = 1; } - else if (ch == ' ' || ch == '-') { + else if (ELEM(ch, ' ', '-')) { end = i + 1; chop = 0; if (i >= cursin) { @@ -483,7 +483,7 @@ static int text_draw_wrapped(const SpaceText *st, break; } } - else if (str[mi] == ' ' || str[mi] == '-') { + else if (ELEM(str[mi], ' ', '-')) { wrap = i + 1; mend = mi + 1; } @@ -820,7 +820,7 @@ int text_get_visible_lines(const SpaceText *st, ARegion *region, const char *str start = MIN2(end, i); end += max; } - else if (ch == ' ' || ch == '-') { + else if (ELEM(ch, ' ', '-')) { end = i + 1; } |