def show_tooltip_popup(self, search_result):
""" open the poup with limit of time """
pt1 = self.word_point.begin()
pt2 = self.word_point.end()
self.view.add_regions('ToolTipHelper', [sublime.Region(pt1, pt2)], 'invalid', '' , sublime.DRAW_NO_FILL)
if self.has_timeout:
# set timout to 10 seconds, in the end hide the tooltip window
sublime.set_timeout(lambda:self.hide(), self.set_timeout)
# open popup window in the current cursor
show_popup(self.view,
search_result,
location = self.location,
on_navigate=self.on_navigate,
max_width=self.max_width)
self.results_arr = []
评论列表
文章目录