Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 28c4b35

Browse files
authored
Merge pull request #1226 from github/jcansdale/show-margin-when-changes
Only show comment margin if there are changes in current file
2 parents db89b97 + 8884d77 commit 28c4b35

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
using System;
22
using System.Collections;
33
using System.Collections.Generic;
4-
using System.ComponentModel;
54
using System.Linq;
65
using System.Reactive.Linq;
76
using System.Threading.Tasks;
87
using GitHub.Extensions;
9-
using GitHub.InlineReviews.Services;
108
using GitHub.Logging;
119
using GitHub.Models;
1210
using GitHub.Services;
13-
using GitHub.VisualStudio;
1411
using Microsoft.VisualStudio.Text;
1512
using Microsoft.VisualStudio.Text.Editor;
1613
using Microsoft.VisualStudio.Text.Tagging;
@@ -50,7 +47,7 @@ public InlineCommentTagger(
5047
this.sessionManager = sessionManager;
5148
}
5249

53-
public bool ShowMargin => file != null;
50+
public bool ShowMargin => file?.Diff?.Count > 0;
5451

5552
public event EventHandler<SnapshotSpanEventArgs> TagsChanged;
5653

0 commit comments

Comments
 (0)