File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,7 @@ def run_code_and_maybe_finish(self, for_code=None):
511511 #TODO This should be printed ABOVE the error that just happened instead
512512 # or maybe just thrown away and not shown
513513 if self .current_stdouterr_line :
514- self .display_lines .extend (paint .display_linize (self .current_stdouterr_line , self .width ))
514+ self .display_lines .extend (paint .display_linize (self .current_stdouterr_line , self .width ), blank_line = True )
515515 self .current_stdouterr_line = ''
516516
517517 self ._current_line = ' ' * indent
Original file line number Diff line number Diff line change 1515# * return an array of the width they were asked for
1616# * return an array not taller than the height they were asked for
1717
18- def display_linize (msg , columns ):
18+ def display_linize (msg , columns , blank_line = False ):
1919 """Returns lines obtained by splitting msg over multiple lines.
2020
2121 Warning: if msg is empty, returns an empty list of lines"""
2222 display_lines = ([msg [start :end ]
2323 for start , end in zip (
2424 range (0 , len (msg ), columns ),
2525 range (columns , len (msg )+ columns , columns ))]
26- if msg else [] )
26+ if msg else ([ '' ] if blank_line else []) )
2727 return display_lines
2828
2929def paint_history (rows , columns , display_lines ):
You can’t perform that action at this time.
0 commit comments