def show_toc(self, pkg_info, items, stack):
captions = [[item["caption"], item["topic"] +
(" ({} topics)".format(len(item["children"])) if "children" in item else "")]
for item in items]
if len(captions) == 0 and len(stack) == 0:
return log("No help topics defined for %s", pkg_info.package,
status=True)
if len(stack) > 0:
captions.insert(0, ["..", "Go back"])
sublime.active_window().show_quick_panel(
captions,
on_select=lambda index: self.select_toc_item(pkg_info, items, stack, index))
评论列表
文章目录