@@ -178,22 +178,25 @@ def run(self, edit):
178178 phantoms = []
179179 self .view .erase_phantoms ('git-blame' )
180180 #Before adding the phantom, see if the current phantom that is displayed is at the same spot at the selection
181- if not (self .phantom_set .phantoms and self .view .line (self .view .sel ()[0 ]) == self .view .line (self .phantom_set .phantoms [0 ].region )):
182- for region in self .view .sel ():
183- line = self .view .line (region )
184- (row , col ) = self .view .rowcol (region .begin ())
185- full_path = self .view .file_name ()
186- result = self .get_blame (int (row ) + 1 , full_path )
187- if not result :
188- # Unable to get blame
189- return
190-
191- sha , user , date , time = self .parse_blame (result )
192-
193- body = template_one .format (sha = sha , user = user , date = date , time = time , stylesheet = stylesheet_one )
194-
195- phantom = sublime .Phantom (line , body , sublime .LAYOUT_BLOCK , self .on_phantom_close )
196- phantoms .append (phantom )
181+ if self .phantom_set .phantoms and self .view .line (self .view .sel ()[0 ]) == self .view .line (self .phantom_set .phantoms [0 ].region ):
182+ self .phantom_set .update (phantoms )
183+ return
184+
185+ for region in self .view .sel ():
186+ line = self .view .line (region )
187+ (row , col ) = self .view .rowcol (region .begin ())
188+ full_path = self .view .file_name ()
189+ result = self .get_blame (int (row ) + 1 , full_path )
190+ if not result :
191+ # Unable to get blame
192+ return
193+
194+ sha , user , date , time = self .parse_blame (result )
195+
196+ body = template_one .format (sha = sha , user = user , date = date , time = time , stylesheet = stylesheet_one )
197+
198+ phantom = sublime .Phantom (line , body , sublime .LAYOUT_BLOCK , self .on_phantom_close )
199+ phantoms .append (phantom )
197200 self .phantom_set .update (phantoms )
198201
199202
0 commit comments