Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions git-blame.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def on_phantom_close(self, href):
elif intent == "show":
desc = self.get_commit(sha, self.view.file_name()).decode('utf-8')
buf = self.view.window().new_file()
buf.run_command('insert_commit_description', {'desc': desc})
buf.run_command('insert_commit_description', {'desc': desc, 'scratch_view_name': 'commit ' + sha})
else:
self.view.erase_phantoms('git-blame')
else:
Expand All @@ -182,7 +182,7 @@ def run(self, edit):
if self.phantom_set.phantoms and self.view.line(self.view.sel()[0]) == self.view.line(self.phantom_set.phantoms[0].region):
self.phantom_set.update(phantoms)
return

for region in self.view.sel():
line = self.view.line(region)
(row, col) = self.view.rowcol(region.begin())
Expand Down Expand Up @@ -347,8 +347,9 @@ def on_modified_async(self):

class InsertCommitDescriptionCommand(sublime_plugin.TextCommand):

def run(self, edit, desc):
def run(self, edit, desc, scratch_view_name):
view = self.view
view.set_scratch(True)
view.set_syntax_file('Packages/Diff/Diff.sublime-syntax')
view.insert(edit, 0, desc)
view.set_name(scratch_view_name)