Issue #14105: Stop removing breakpoints from Idle editors.
Move BREAK tag configuration to PyShellEditorWindow.
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 0d94944..1e86292 100755
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -143,6 +143,7 @@
self.io.set_filename_change_hook(filename_changed_hook)
if self.io.filename:
self.restore_file_breaks()
+ self.color_breakpoint_text()
rmenu_specs = [
("Cut", "<<cut>>", "rmenu_check_cut"),
@@ -152,6 +153,15 @@
("Clear Breakpoint", "<<clear-breakpoint-here>>", 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