summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Serwy <roger.serwy@gmail.com>2013-04-07 17:41:16 (GMT)
committerRoger Serwy <roger.serwy@gmail.com>2013-04-07 17:41:16 (GMT)
commit7733be8f2612df4caad771795de40cabf66b287b (patch)
tree188c48044148b627972c85aeaacbfbb85e1bddec
parent6b2918ae7516d8efe306f59a636601a3d3bb6f1a (diff)
downloadcpython-7733be8f2612df4caad771795de40cabf66b287b.zip
cpython-7733be8f2612df4caad771795de40cabf66b287b.tar.gz
cpython-7733be8f2612df4caad771795de40cabf66b287b.tar.bz2
#17613: Prevent traceback when removing syntax colorizer in IDLE.
-rw-r--r--Lib/idlelib/ColorDelegator.py4
-rw-r--r--Misc/NEWS2
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py
index e4ccb42..61e2be4 100644
--- a/Lib/idlelib/ColorDelegator.py
+++ b/Lib/idlelib/ColorDelegator.py
@@ -51,6 +51,10 @@ class ColorDelegator(Delegator):
self.config_colors()
self.bind("<<toggle-auto-coloring>>", self.toggle_colorize_event)
self.notify_range("1.0", "end")
+ else:
+ # No delegate - stop any colorizing
+ self.stop_colorizing = True
+ self.allow_colorizing = False
def config_colors(self):
for tag, cnf in self.tagdefs.items():
diff --git a/Misc/NEWS b/Misc/NEWS
index 08dff45..25b4b53 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -33,6 +33,8 @@ Library
IDLE
----
+- Issue #17613: Prevent traceback when removing syntax colorizer in IDLE.
+
- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.