Skip to content

Commit f6043df

Browse files
fix #349
introduces inconsistent coloring (last line of stderr will not be red, rest still will be) but this will be fixed soon by explicit traceback + error syntax highlighting.
1 parent 8e0cc92 commit f6043df

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,12 @@ def send_to_stdout(self, output):
775775
logger.debug('display_lines: %r', self.display_lines)
776776

777777
def send_to_stderr(self, error):
778-
#self.send_to_stdout(error)
778+
lines = error.split('\n')
779+
if lines[-1]:
780+
self.current_stdouterr_line += lines[-1]
779781
self.display_lines.extend([func_for_letter(self.config.color_scheme['error'])(line)
780-
for line in sum([paint.display_linize(line, self.width)
781-
for line in error.split('\n')], [])])
782+
for line in sum([paint.display_linize(line, self.width, blank_line=True)
783+
for line in lines[:-1]], [])])
782784

783785
def send_to_stdin(self, line):
784786
if line.endswith('\n'):

0 commit comments

Comments
 (0)