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();
303303 getFile : function ( ) {
304304 return this . $el . parents ( 'li' ) . find ( 'h2>a:first' ) . text ( ) ;
305305 } ,
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+ } ,
306313 getLineNumberInDiff : function ( ) {
307314 return Rows . getLineNumberInDiffByTr ( this . el ) ;
308315 } ,
309316 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)' ;
311322 }
312323 } ) ;
313324
You can’t perform that action at this time.
0 commit comments