def tick(self, position):
current_view = self.window.active_view()
if self.tick_view is not None and current_view != self.tick_view:
self.tick_view.erase_status(self.key)
self.tick_view = None
if not self.thread.is_alive():
current_view.erase_status(self.key)
return
text = "%s [%s]" % (self.prefix, self.spin_text[position])
position = (position + 1) % len(self.spin_text)
current_view.set_status(self.key, text)
if self.tick_view is None:
self.tick_view = current_view
sublime.set_timeout(lambda: self.tick(position), 250)
###----------------------------------------------------------------------------
评论列表
文章目录