def show_popup_if_needed(self, view, row):
"""Show a popup if it is needed in this row.
Args:
view (sublime.View): current view
row (int): number of row
"""
if view.buffer_id() not in self.err_regions:
return
current_err_region_dict = self.err_regions[view.buffer_id()]
if row in current_err_region_dict:
errors_dict = current_err_region_dict[row]
errors_html = PopupErrorVis._as_html(errors_dict)
view.show_popup(errors_html, max_width=self._MAX_POPUP_WIDTH)
else:
log.debug("no error regions for row: %s", row)
评论列表
文章目录