def reset_layout():
"""Removes the Code Map group, and scales up the layout."""
w = win()
layout = w.get_layout()
cols = layout['cols']
width = 1 - settings().get("codemap_width")
alone_in_group = len(win().views_in_group(CodeMapListener.map_group)) == 0
if alone_in_group:
for i, col in enumerate(cols):
if col > 0:
cols[i] = col/width
cols[-2] = 1.0
del cols[-1]
del layout['cells'][-1]
Mapper.block_max_pane(True)
w.run_command("set_layout", layout)
sublime.set_timeout(lambda: Mapper.block_max_pane(False), 10)
# -----------------
评论列表
文章目录