File tree Expand file tree Collapse file tree 1 file changed +24
-11
lines changed Expand file tree Collapse file tree 1 file changed +24
-11
lines changed Original file line number Diff line number Diff line change 1414import sublime_plugin
1515
1616
17+ debug = lambda * a : None # replace with debug = print if needed
18+
19+
1720############
1821# Settings #
1922############
2023
21- settings = sublime .load_settings ("PythonBreakpoints.sublime-settings" )
24+ settings = None
25+ pdb_block = ''
26+ tab_size = 4
2227
23- tab_size = settings .get ('tab_size' )
24- if tab_size == 'auto' or tab_size is None :
25- g_settings = sublime .load_settings ('Preferences.sublime-settings' )
26- tab_size = g_settings .get ('tab_size' , 4 )
2728
28- debug = lambda * a : None # replace with debug = print if needed
29+ def plugin_loaded ():
30+ global settings
31+ settings = sublime .load_settings ("PythonBreakpoints.sublime-settings" )
2932
33+ global tab_size
34+ tab_size = settings .get ('tab_size' )
35+ if tab_size == 'auto' or tab_size is None :
36+ g_settings = sublime .load_settings ('Preferences.sublime-settings' )
37+ tab_size = g_settings .get ('tab_size' , 4 )
3038
31- #############
32- # Constants #
33- #############
34-
35- pdb_block = """\
39+ global pdb_block
40+ pdb_block = """\
3641 # do not edit! added by PythonBreakpoints
3742from %s import set_trace as _breakpoint
3843
3944
4045""" % settings .get ('debugger' , 'pdb' )
4146
47+ # for ST2
48+ plugin_loaded ()
49+
50+
51+ #############
52+ # Constants #
53+ #############
54+
4255bp_regex = r"^[\t ]*_breakpoint\(\) # ([a-f0-9]{8})"
4356bp_re = re .compile (bp_regex , re .DOTALL )
4457
You can’t perform that action at this time.
0 commit comments