@@ -169,7 +169,7 @@ def on_phantom_close(self, href):
169
169
elif intent == "show" :
170
170
desc = self .get_commit (sha , self .view .file_name ()).decode ('utf-8' )
171
171
buf = self .view .window ().new_file ()
172
- buf .run_command ('insert_commit_description' , {'desc' : desc })
172
+ buf .run_command ('insert_commit_description' , {'desc' : desc , 'scratch_view_name' : 'commit ' + sha })
173
173
else :
174
174
self .view .erase_phantoms ('git-blame' )
175
175
else :
@@ -182,7 +182,7 @@ def run(self, edit):
182
182
if self .phantom_set .phantoms and self .view .line (self .view .sel ()[0 ]) == self .view .line (self .phantom_set .phantoms [0 ].region ):
183
183
self .phantom_set .update (phantoms )
184
184
return
185
-
185
+
186
186
for region in self .view .sel ():
187
187
line = self .view .line (region )
188
188
(row , col ) = self .view .rowcol (region .begin ())
@@ -347,8 +347,9 @@ def on_modified_async(self):
347
347
348
348
class InsertCommitDescriptionCommand (sublime_plugin .TextCommand ):
349
349
350
- def run (self , edit , desc ):
350
+ def run (self , edit , desc , scratch_view_name ):
351
351
view = self .view
352
352
view .set_scratch (True )
353
353
view .set_syntax_file ('Packages/Diff/Diff.sublime-syntax' )
354
354
view .insert (edit , 0 , desc )
355
+ view .set_name (scratch_view_name )
0 commit comments