🐛 check if color scheme is valid before loading
This commit is contained in:
@ -127,7 +127,7 @@ def get_style(color_scheme):
|
|||||||
if os.path.exists(USER_STYLE_FILE):
|
if os.path.exists(USER_STYLE_FILE):
|
||||||
with open(USER_STYLE_FILE) as fp:
|
with open(USER_STYLE_FILE) as fp:
|
||||||
css += '\n' + fp.read() + '\n'
|
css += '\n' + fp.read() + '\n'
|
||||||
if color_scheme:
|
if color_scheme and color_scheme.endswith('.tmTheme'):
|
||||||
css += pygments_from_theme(get_resource(color_scheme))
|
css += pygments_from_theme(get_resource(color_scheme))
|
||||||
return ''.join([line.strip() + ' ' for line in css.splitlines()])
|
return ''.join([line.strip() + ' ' for line in css.splitlines()])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user