def generate_color_scheme(from_reload=True):
"""
Asynchronously call generate_color_scheme_async.
from_reload is True if this is called from the change callback for user settings.
"""
# If this was called from a reload of prefs, turn off the prefs observer,
# otherwise we'll end up back here when ST updates the prefs with the new color.
if from_reload:
from . import persist
def prefs_reloaded():
persist.settings.observe_prefs()
persist.settings.observe_prefs(observer=prefs_reloaded)
# ST crashes unless this is run async
sublime.set_timeout_async(generate_color_scheme_async, 0)
评论列表
文章目录