def handle_response(self, response, point):
if response is not None:
self._signatures = response.get("signatures", [])
self._active_signature = response.get("activeSignature", -1)
if self._signatures:
if not 0 <= self._active_signature < len(self._signatures):
debug("activeSignature {} not a valid index for signatures length {}".format(
self._active_signature, len(self._signatures)))
self._active_signature = 0
else:
if self._active_signature != -1:
debug("activeSignature should be -1 or null when no signatures are returned")
self._active_signature = -1
if len(self._signatures) > 0:
mdpopups.show_popup(self.view,
self._build_popup_content(),
css=popup_css,
md=True,
flags=sublime.HIDE_ON_MOUSE_MOVE_AWAY,
location=point,
wrapper_class=popup_class,
max_width=800,
on_hide=self._on_hide,
on_navigate=lambda href: self._on_hover_navigate(href))
self._visible = True
评论列表
文章目录