From da26cca1cef111282e4be83af0994305c6218ade Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 8 Aug 2014 23:33:16 -0400 Subject: Issue #14105: Stop removing breakpoints from Idle editors. Move BREAK tag configuration to PyShellEditorWindow. --- Lib/idlelib/PyShell.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Lib/idlelib/PyShell.py') diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index c23b62abd9..865692743a 100755 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -138,6 +138,7 @@ class PyShellEditorWindow(EditorWindow): self.io.set_filename_change_hook(filename_changed_hook) if self.io.filename: self.restore_file_breaks() + self.color_breakpoint_text() rmenu_specs = [ ("Cut", "<>", "rmenu_check_cut"), @@ -148,6 +149,15 @@ class PyShellEditorWindow(EditorWindow): ("Clear Breakpoint", "<>", None) ] + def color_breakpoint_text(self, color=True): + "Turn colorizing of breakpoint text on or off" + if color: + theme = idleConf.GetOption('main','Theme','name') + cfg = idleConf.GetHighlight(theme, "break") + else: + cfg = {'foreground': '', 'background': ''} + self.text.tag_config('BREAK', cfg) + def set_breakpoint(self, lineno): text = self.text filename = self.io.filename -- cgit v1.2.1