Skip to content
Snippets Groups Projects

Disable commenting on invalid lines (no identifier or in renamed files)

Merged Thomas Randolph requested to merge tor/defect/disable-comment-on-unchanged-line into master
4 files
+ 20
3
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -60,7 +60,7 @@ export const addCommentTooltip = (line) => {
if (!line) return tooltip;
tooltip = __('Add a comment to this line or drag for multiple lines');
const brokenSymlinks = line.commentsDisabled;
const { brokenSymlinks, brokenLineCode, fileOnlyMoved } = line.problems;
if (brokenSymlinks) {
if (brokenSymlinks.wasSymbolic || brokenSymlinks.isSymbolic) {
@@ -72,6 +72,10 @@ export const addCommentTooltip = (line) => {
'Commenting on files that replace or are replaced by symbolic links is currently not supported.',
);
}
} else if (fileOnlyMoved) {
tooltip = __('Commenting on files that are only moved or renamed is currently not supported');
} else if (brokenLineCode) {
tooltip = __('Commenting on this line is currently not supported');
}
return tooltip;
Loading