| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,15 +25,11 @@ def display_linize(msg, columns, blank_line=False): | |||
| 25 | 25 | """Returns lines obtained by splitting msg over multiple lines. | |
| 26 | 26 | ||
| 27 | 27 | Warning: if msg is empty, returns an empty list of lines""" | |
| 28 | - msg = fmtstr(msg) | ||
| 29 | - try: | ||
| 30 | - display_lines = ([msg.width_aware_slice(slice(start, end)) | ||
| 31 | - for start, end in zip( | ||
| 32 | - range(0, msg.width, columns), | ||
| 33 | - range(columns, msg.width + columns, columns))] | ||
| 34 | - if msg else ([''] if blank_line else [])) | ||
| 35 | - except ValueError: | ||
| 36 | - display_lines = [''] | ||
| 28 | + display_lines = ([msg[start:end] | ||
| 29 | + for start, end in zip( | ||
| 30 | + range(0, len(msg), columns), | ||
| 31 | + range(columns, len(msg) + columns, columns))] | ||
| 32 | + if msg else ([''] if blank_line else [])) | ||
| 37 | 33 | return display_lines | |
| 38 | 34 | ||
| 39 | 35 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments