]> granicus.if.org Git - python/commitdiff
#17613: Prevent traceback when removing syntax colorizer in IDLE.
authorRoger Serwy <roger.serwy@gmail.com>
Sun, 7 Apr 2013 17:41:16 +0000 (12:41 -0500)
committerRoger Serwy <roger.serwy@gmail.com>
Sun, 7 Apr 2013 17:41:16 +0000 (12:41 -0500)
Lib/idlelib/ColorDelegator.py
Misc/NEWS

index e4ccb4258c624592514f532e4a2556310576a5f6..61e2be47c7e7fe57c00b453b1be21b31092e428c 100644 (file)
@@ -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():
index 08dff45618f0d27c50ed5cc5a412f5023012595c..25b4b53d408323bfcf869e6b665afc6b3cc8cd2c 100644 (file)
--- 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.