util.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:sublime-text-3-packages 作者: nickjj 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号