Skip to content

Commit

Permalink
Fix #6940, error traceback output to console crashes under QScintilla…
Browse files Browse the repository at this point in the history
… 2.7
  • Loading branch information
dakcarto committed Jan 4, 2013
1 parent 08be5cd commit 866bc22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/console/console_output.py
Expand Up @@ -38,7 +38,9 @@ def __init__(self, edit, out=None, style=None):

def write(self, m):
if self.style == "traceback":
self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1)
# Show errors in red
pos = self.outputArea.SendScintilla(QsciScintilla.SCI_GETCURRENTPOS)
self.outputArea.SendScintilla(QsciScintilla.SCI_STARTSTYLING, pos, 31)
self.outputArea.append(m)
self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1)
else:
Expand Down

0 comments on commit 866bc22

Please sign in to comment.