code_map.py 文件源码

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

项目:sublime-codemap 作者: oleg-shilo 项目源码 文件源码
def create_codemap_group():
    """Adds a column on the right, and scales down the layout."""
    w = win()
    layout = win().get_layout()
    cols = layout['cols']
    cells = layout['cells']
    last_col = len(cols) - 1
    last_row = len(layout['rows']) - 1
    width = 1 - settings().get("codemap_width")

    for i, col in enumerate(cols):
        if col > 0:
            cols[i] = col*width

    cols.append(1)
    newcell = [last_col, 0, last_col + 1, last_row]
    cells.append(newcell)
    groups = w.num_groups()
    w.run_command("set_layout", layout)
    sublime.set_timeout(lambda: Mapper.block_max_pane(False), 10)
    return (groups + 1)

# -----------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号