Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ def execfile(self, filename, source=None):

def runsource(self, source):
"Extend base class method: Stuff the source in the line cache first"
# Remove the highlighting of a previous syntax error (gh-93966).
self.tkconsole.text.tag_remove("ERROR", "1.0", "end")
filename = self.stuffsource(source)
# at the moment, InteractiveInterpreter expects str
assert isinstance(source, str)
Expand Down Expand Up @@ -730,7 +732,6 @@ def showsyntaxerror(self, filename=None, **kwargs):
"""
tkconsole = self.tkconsole
text = tkconsole.text
text.tag_remove("ERROR", "1.0", "end")
type, value, tb = sys.exc_info()
msg = getattr(value, 'msg', '') or value or "<no detail available>"
lineno = getattr(value, 'lineno', '') or 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The highlighting of a syntax error in the IDLE Shell is now removed when the
next statement is entered, not only when the next syntax error occurs.
Loading