diff --git a/src/GitHub.Exports.Reactive/Services/IInlineCommentPeekService.cs b/src/GitHub.Exports.Reactive/Services/IInlineCommentPeekService.cs index 219f657241..357ba17b84 100644 --- a/src/GitHub.Exports.Reactive/Services/IInlineCommentPeekService.cs +++ b/src/GitHub.Exports.Reactive/Services/IInlineCommentPeekService.cs @@ -12,12 +12,12 @@ namespace GitHub.Services public interface IInlineCommentPeekService { /// - /// Gets the line number for a peek session tracking point. + /// Gets the 0-based line number for a peek session tracking point. /// /// The peek session. /// The peek session tracking point /// - /// A tuple containing the line number and whether the line number represents a line in the + /// A tuple containing the 0-based line number and whether the line number represents a line in the /// left hand side of a diff view. /// Tuple GetLineNumber(IPeekSession session, ITrackingPoint point); diff --git a/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs b/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs index 50431ece39..4ff479ce9e 100644 --- a/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs @@ -196,7 +196,7 @@ async Task UpdateThread() AvailableForComment = file.Diff.Any(chunk => chunk.Lines - .Any(line => line.NewLineNumber == lineNumber)); + .Any(line => line.NewLineNumber - 1 == lineNumber)); var thread = file.InlineCommentThreads?.FirstOrDefault(x => x.LineNumber == lineNumber &&