We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caf805e commit 7b48a24Copy full SHA for 7b48a24
1 file changed
code_comments/htdocs/code-comments.js
@@ -303,11 +303,22 @@ var underscore = _.noConflict();
303
getFile: function() {
304
return this.$el.parents( 'li' ).find( 'h2>a:first' ).text();
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
+ },
313
getLineNumberInDiff: function() {
314
return Rows.getLineNumberInDiffByTr( this.el );
315
316
getDisplayLine: function() {
- return this.$lineNumberCell.text().trim() || this.$th.first().text() + ' (deleted)';
317
+ var lineNumber = this.getLineNumberInFile()
318
+ if (lineNumber > 0)
319
320
321
+ return lineNumber * -1 + ' (deleted)';
322
}
323
} );
324
0 commit comments