def on_hover(self, view, point, hover_zone):
loc = Settings.get('vale_alert_location')
for alert in Settings.on_hover:
region = alert['region']
if alert['view_id'] == view.id() and region.contains(point):
if loc == 'hover_popup':
view.show_popup(
alert['HTML'], flags=sublime.HIDE_ON_MOUSE_MOVE_AWAY,
location=point, on_navigate=webbrowser.open,
max_width=Settings.get('vale_popup_width'))
elif loc == 'hover_status_bar':
sublime.status_message(
'vale:{0}:{1}'.format(alert['level'], alert['msg']))
评论列表
文章目录