Skip to content


refresh annotations after every command #161

wants to merge 1 commit into from

2 participants


This isn't working yet, but I've hit a bit of a brick wall. I would love some help on what I'm doing wrong. Trying to solve #100.


Easiest fix: set may_change_files = True for commands that need to refresh annotations.
This causes the file to be reloaded and as a consequence the event listener for annotations catches the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 14, 2012
  1. @sheldon
Showing with 7 additions and 2 deletions.
  1. +7 −2
@@ -152,6 +152,11 @@ def run_command(self, command, callback=None, show_status=True,
if not callback:
callback = self.generic_done
+ if not isinstance(self, GitAnnotateCommand):
+ for view in self.get_window().views():
+ if view.settings().get('live_git_annotations'):
+ view.run_command('git_annotate', {"reset":True})
thread = CommandThread(command, callback, **kwargs)
@@ -958,9 +963,9 @@ class GitAnnotateCommand(GitTextCommand):
# current state of the HEAD is being pulled from git.
# 2. All consecutive runs will pass the current buffer into diffs stdin. The resulting
# output is then parsed and regions are set accordingly.
- def run(self, view):
+ def run(self, view, reset=None):
# If the annotations are already running, we dont have to create a new tmpfile
- if hasattr(self, "tmp"):
+ if hasattr(self, "tmp") and not reset:
self.tmp = tempfile.NamedTemporaryFile()
Something went wrong with that request. Please try again.