def on_select(self, selected): if 0 > selected < len(self.results): return item = self.results[selected] commit = self.item_to_commit(item) ViewCollection.set_compare(commit) ViewCollection.clear_git_time(self.view) ViewCollection.add(self.view)
def on_modified(self, view): if not self.live_mode: return None if not self.non_blocking: if not self.live_delay: ViewCollection.add(view) elif not self.delayed_update_scheduled: if self.allow_instant_update: self.allow_instant_update = False sublime.set_timeout(lambda: self.delayed_update(view), 10) sublime.set_timeout(lambda: self.enable_instant_update(), self.live_instant_interval) else: self.delayed_update_scheduled = True sublime.set_timeout(lambda: self.delayed_update(view), self.live_continuous_delay)
def on_activated(self, view): if self.settings_loaded(): if not self.non_blocking and self.focus_change_mode: ViewCollection.add(view)
def on_post_save(self, view): if self.settings_loaded(): if not self.non_blocking: ViewCollection.add(view)
def on_post_save_async(self, view): if self.non_blocking: ViewCollection.add(view)
def on_modified_async(self, view): if not self.live_mode: return None if self.non_blocking: ViewCollection.add(view)
def on_load_async(self, view): if self.non_blocking and not self.live_mode: ViewCollection.add(view)
def on_post_save(self, view): if not self.non_blocking: ViewCollection.add(view)
def on_modified(self, view): if self.live_mode: ViewCollection.add(view)
def delayed_update(self, view): ViewCollection.add(view) self.delayed_update_scheduled = False
def on_clone_async(self, view): if self.settings_loaded(): if self.non_blocking: ViewCollection.add(view)
def on_modified_async(self, view): if self.settings_loaded(): if self.non_blocking and self.live_mode: ViewCollection.add(view)
def on_activated_async(self, view): if self.non_blocking and self.focus_change_mode: ViewCollection.add(view)
def on_clone_async(self, view): if self.non_blocking: ViewCollection.add(view)
def run(self): self.view = self.window.active_view() ViewCollection.set_compare("HEAD") ViewCollection.clear_git_time(self.view) ViewCollection.add(self.view)
def on_activated_async(self, view): if self.non_blocking: ViewCollection.add(view)
def get_handler(view): if ViewCollection.has_view(view): key = ViewCollection.get_key(view) return ViewCollection.views[key] else: return ViewCollection.add(view)
def on_clone(self, view): ViewCollection.add(view)
def on_post_save(self, view): ViewCollection.add(view)
def on_activated(self, view): ViewCollection.add(view)
def on_load(self, view): if self.settings_loaded(): if not self.non_blocking and not self.live_mode: ViewCollection.add(view)
def on_modified(self, view): if view.settings().get('git_gutter_live_mode', True): ViewCollection.add(view)
def on_clone(self, view): if not self.non_blocking: ViewCollection.add(view)
def on_activated(self, view): if not self.non_blocking: ViewCollection.add(view)