]> git.ipfire.org Git - thirdparty/Python/cpython.git/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 0610c4b6aac3321aebfd13bd35b062d7740aba84..c74865d4fb43719f55ec9a515860e485fd9e10e7 100644 (file)
@@ -50,6 +50,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 abb5068e3dcf4de54eebc6e5b7437fb9a754721a..e2ed81c289e089d4fade0e2330f9ae930070d733 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -23,6 +23,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.