ToolTipHelper.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ToolTip-Helper 作者: doobleweb 项目源码 文件源码
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 = []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号