Utils.py 文件源码

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

项目:GhostText-for-SublimeText 作者: GhostText 项目源码 文件源码
def close_view(view):
        """
        Closes the given view by running the close_by_index command.
        If there are more than one open windows and the window has no more views it gets closed, too.
        """
        window = view.window()
        group_index, view_index = window.get_view_index(view)
        window.run_command('close_by_index', {'group': group_index, 'index': view_index})
        if len(sublime.windows()) > 1 and len(window.views()) is 0:
            window.run_command('close')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号