def show_popup(self, symbol, symbolDescription):
output = symbolDescription
if getSetting('debug'):
print(output)
self.currentSymbol = symbol
width, height = self.view.viewport_extent()
output = self.formatPopup(output, symbol=symbol)
# It seems sublime will core when the output is too long
# In some cases the value can set to 76200, but we use a 65535 for safety.
output = output[:65535]
self.view.show_popup(
output,
flags=sublime.COOPERATE_WITH_AUTO_COMPLETE | sublime.HTML,
location=-1,
max_width=min(getSetting('popup_max_width'), width),
max_height=min(getSetting('popup_max_height'), height - 100),
on_navigate=self.on_navigate,
on_hide=self.on_hide
)
评论列表
文章目录