Skip to content

Commit 9d4073a

Browse files
committed
Add missing break statements
1 parent c8077e1 commit 9d4073a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/text.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,13 @@ def _get_wrapped_text(self):
657657
if current_width > line_width:
658658
wrapped_str += ' '.join(sub_words[:i - 1]) + '\n'
659659
sub_words = sub_words[i - 1:]
660+
break
661+
660662
# Otherwise if all words fit in the width, append them all
661663
elif i == len(sub_words):
662664
wrapped_str += ' '.join(sub_words[:i])
663665
sub_words = []
666+
break
664667

665668
return wrapped_str
666669

0 commit comments

Comments
 (0)