File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,13 +111,18 @@ def generate_color_scheme_async():
111111 return
112112
113113 # write new theme
114- scheme_path = os .path .join (os .path .split (sublime .packages_path ())[0 ], scheme )
114+ original_name = os .path .splitext (os .path .basename (scheme ))[0 ]
115+ new_name = original_name + ' (SublimePythonIDE).tmTheme'
116+ scheme_path = os .path .join (sublime .packages_path (), 'User' , new_name )
115117
116118 with open (scheme_path , 'w' , encoding = 'utf8' ) as f :
117119 f .write (COLOR_SCHEME_PREAMBLE )
118120 f .write (ElementTree .tostring (plist , encoding = 'unicode' ))
119121
120- prefs .set ('color_scheme' , scheme )
122+ # ST does not expect platform specific paths here, but only
123+ # forward-slash separated paths relative to "Packages"
124+ new_theme_setting = "/" .join (['Packages' , 'User' , new_name ])
125+ prefs .set ('color_scheme' , new_theme_setting )
121126 sublime .save_settings ("Preferences.sublime-settings" )
122127
123128 # run async
You can’t perform that action at this time.
0 commit comments