Skip to content

Commit 866bc22

Browse files
committedJan 4, 2013
Fix #6940, error traceback output to console crashes under QScintilla 2.7
1 parent 08be5cd commit 866bc22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎python/console/console_output.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def __init__(self, edit, out=None, style=None):
3838

3939
def write(self, m):
4040
if self.style == "traceback":
41-
self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1)
41+
# Show errors in red
42+
pos = self.outputArea.SendScintilla(QsciScintilla.SCI_GETCURRENTPOS)
43+
self.outputArea.SendScintilla(QsciScintilla.SCI_STARTSTYLING, pos, 31)
4244
self.outputArea.append(m)
4345
self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1)
4446
else:

0 commit comments

Comments
 (0)
Please sign in to comment.