def on_selection_modified_async(self, view):
"""
ST API method: gets called when selection changed
"""
if len(view.sel()) > 1 or not INFOS.addon:
return None
try:
region = view.sel()[0]
except Exception:
return None
if region == self.prev_selection:
return None
self.prev_selection = region
delay = self.settings.get("tooltip_delay", 200)
if self.timer:
self.timer.cancel()
self.timer = Timer(delay / 1000, self.show_tooltip, (view,))
self.timer.start()
评论列表
文章目录