diff options
author | Roger Serwy <roger.serwy@gmail.com> | 2013-04-07 17:41:16 (GMT) |
---|---|---|
committer | Roger Serwy <roger.serwy@gmail.com> | 2013-04-07 17:41:16 (GMT) |
commit | 7733be8f2612df4caad771795de40cabf66b287b (patch) | |
tree | 188c48044148b627972c85aeaacbfbb85e1bddec /Lib | |
parent | 6b2918ae7516d8efe306f59a636601a3d3bb6f1a (diff) | |
download | cpython-7733be8f2612df4caad771795de40cabf66b287b.zip cpython-7733be8f2612df4caad771795de40cabf66b287b.tar.gz cpython-7733be8f2612df4caad771795de40cabf66b287b.tar.bz2 |
#17613: Prevent traceback when removing syntax colorizer in IDLE.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/ColorDelegator.py | 4 |
1 files changed, 4 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(): |