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

Commit 2cafd0a

Browse files
authored
Merge pull request #1063 from github/fixes/1043-peek-comments-anchor
Close other peek views before showing new one.
2 parents dcf4701 + f09f0b7 commit 2cafd0a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/GitHub.InlineReviews/Commands/InlineCommentNavigationCommand.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ protected void ShowPeekComments(
215215
ShowInlineCommentTag tag,
216216
IEnumerable<ITextView> allTextViews)
217217
{
218+
foreach (var other in allTextViews)
219+
{
220+
if (other != textView)
221+
{
222+
peekService.Hide(other);
223+
}
224+
}
225+
218226
var point = peekService.Show(textView, tag);
219227

220228
if (parameter?.MoveCursor != false)
@@ -231,14 +239,6 @@ protected void ShowPeekComments(
231239
textView.Caret.MoveTo(caretPoint.Value);
232240
}
233241
}
234-
235-
foreach (var other in allTextViews)
236-
{
237-
if (other != textView)
238-
{
239-
peekService.Hide(other);
240-
}
241-
}
242242
}
243243

244244
SnapshotPoint? Map(IMappingPoint p, ITextSnapshot textSnapshot)

0 commit comments

Comments
 (0)