(original) (raw)

changeset: 83189:8b793a946acb branch: 3.3 parent: 83186:c26ec5897c5a user: Roger Serwy roger.serwy@gmail.com date: Sun Apr 07 12:41:16 2013 -0500 files: Lib/idlelib/ColorDelegator.py Misc/NEWS description: #17613: Prevent traceback when removing syntax colorizer in IDLE. diff -r c26ec5897c5a -r 8b793a946acb Lib/idlelib/ColorDelegator.py --- a/Lib/idlelib/ColorDelegator.py Sun Apr 07 12:15:52 2013 -0500 +++ b/Lib/idlelib/ColorDelegator.py Sun Apr 07 12:41:16 2013 -0500 @@ -51,6 +51,10 @@ self.config_colors() self.bind("<>", 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 -r c26ec5897c5a -r 8b793a946acb Misc/NEWS --- a/Misc/NEWS Sun Apr 07 12:15:52 2013 -0500 +++ b/Misc/NEWS Sun Apr 07 12:41:16 2013 -0500 @@ -33,6 +33,8 @@ 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./roger.serwy@gmail.com