File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 77from subprocess import check_output as shell
88
99PHANTOM_KEY_ALL = 'git-blame-all'
10+ SETTING_PHANTOM_ALL_DISPLAYED = 'git-blame-all-displayed'
1011
1112stylesheet_one = '''
1213 <style>
@@ -240,6 +241,7 @@ def run(self, edit):
240241 phantoms .append (phantom )
241242
242243 self .phantom_set .update (phantoms )
244+ self .view .settings ().set (SETTING_PHANTOM_ALL_DISPLAYED , True )
243245
244246 def get_blame_lines (self , path ):
245247 '''Run `git blame` and get the output lines.
@@ -329,7 +331,10 @@ class BlameEraseAllListener(sublime_plugin.ViewEventListener):
329331 def on_modified (self ):
330332 '''Automatically erases the blame results to prevent mismatches.
331333 '''
332- self .view .run_command ('blame_erase_all' )
334+ settings = self .view .settings ()
335+ if settings .get (SETTING_PHANTOM_ALL_DISPLAYED , False ):
336+ self .view .run_command ('blame_erase_all' )
337+ settings .erase (SETTING_PHANTOM_ALL_DISPLAYED )
333338
334339
335340class InsertCommitDescriptionCommand (sublime_plugin .TextCommand ):
You can’t perform that action at this time.
0 commit comments