mirror of https://github.com/python/cpython.git
Merge with 3.4
This commit is contained in:
commit
f1a98f50e6
|
@ -72,7 +72,6 @@ def LoadTagDefs(self):
|
||||||
"DEFINITION": idleConf.GetHighlight(theme, "definition"),
|
"DEFINITION": idleConf.GetHighlight(theme, "definition"),
|
||||||
"SYNC": {'background':None,'foreground':None},
|
"SYNC": {'background':None,'foreground':None},
|
||||||
"TODO": {'background':None,'foreground':None},
|
"TODO": {'background':None,'foreground':None},
|
||||||
"BREAK": idleConf.GetHighlight(theme, "break"),
|
|
||||||
"ERROR": idleConf.GetHighlight(theme, "error"),
|
"ERROR": idleConf.GetHighlight(theme, "error"),
|
||||||
# The following is used by ReplaceDialog:
|
# The following is used by ReplaceDialog:
|
||||||
"hit": idleConf.GetHighlight(theme, "hit"),
|
"hit": idleConf.GetHighlight(theme, "hit"),
|
||||||
|
|
|
@ -138,6 +138,7 @@ def filename_changed_hook(old_hook=self.io.filename_change_hook,
|
||||||
self.io.set_filename_change_hook(filename_changed_hook)
|
self.io.set_filename_change_hook(filename_changed_hook)
|
||||||
if self.io.filename:
|
if self.io.filename:
|
||||||
self.restore_file_breaks()
|
self.restore_file_breaks()
|
||||||
|
self.color_breakpoint_text()
|
||||||
|
|
||||||
rmenu_specs = [
|
rmenu_specs = [
|
||||||
("Cut", "<<cut>>", "rmenu_check_cut"),
|
("Cut", "<<cut>>", "rmenu_check_cut"),
|
||||||
|
@ -148,6 +149,15 @@ def filename_changed_hook(old_hook=self.io.filename_change_hook,
|
||||||
("Clear Breakpoint", "<<clear-breakpoint-here>>", None)
|
("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):
|
def set_breakpoint(self, lineno):
|
||||||
text = self.text
|
text = self.text
|
||||||
filename = self.io.filename
|
filename = self.io.filename
|
||||||
|
|
Loading…
Reference in New Issue