def on_close(self, view):
"""Clean up the visualization.
"""
if 'text.sublundo.tree' not in view.scope_name(0):
return
w = sublime.active_window()
single = not w.views_in_group(0) or not w.views_in_group(1)
if w.num_groups() == 2 and single:
sublime.set_timeout(lambda: w.set_layout(
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
), 300)
w.run_command('hide_panel', {'panel': 'output.sublundo'})
w.destroy_output_panel('output.sublundo')
for v in w.views():
v.erase_regions('sublundo')
评论列表
文章目录