File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -303,11 +303,22 @@ var underscore = _.noConflict();
303
303
getFile : function ( ) {
304
304
return this . $el . parents ( 'li' ) . find ( 'h2>a:first' ) . text ( ) ;
305
305
} ,
306
+ getLineNumberInFile : function ( ) {
307
+ var lineNumber = this . $lineNumberCell . text ( ) . trim ( ) ;
308
+ if ( lineNumber )
309
+ return lineNumber ;
310
+ else
311
+ return this . $th . first ( ) . text ( ) . trim ( ) * - 1 ;
312
+ } ,
306
313
getLineNumberInDiff : function ( ) {
307
314
return Rows . getLineNumberInDiffByTr ( this . el ) ;
308
315
} ,
309
316
getDisplayLine : function ( ) {
310
- return this . $lineNumberCell . text ( ) . trim ( ) || this . $th . first ( ) . text ( ) + ' (deleted)' ;
317
+ var lineNumber = this . getLineNumberInFile ( )
318
+ if ( lineNumber > 0 )
319
+ return lineNumber ;
320
+ else
321
+ return lineNumber * - 1 + ' (deleted)' ;
311
322
}
312
323
} ) ;
313
324
You can’t perform that action at this time.
0 commit comments