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

Commit fe4271c

Browse files
committed
Don't use projection buffer as content source.
`.cshtml` files have a projection buffer which is the contents of the generated C#. Don't use this as a content source for diff matching as it's completely different to the file in git.
1 parent 7dc8344 commit fe4271c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ async Task SessionChanged(IPullRequestSession session)
265265
if (snapshot == null) return;
266266

267267
var repository = gitService.GetRepository(session.LocalRepository.LocalPath);
268-
file = await session.GetFile(relativePath, !leftHandSide ? this : null);
268+
var isContentSource = !leftHandSide && !(buffer is IProjectionBuffer);
269+
file = await session.GetFile(relativePath, isContentSource ? this : null);
269270

270271
if (file == null) return;
271272

0 commit comments

Comments
 (0)