diff --git a/src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs b/src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs index 9619527efcb8a..dcfc11642dd9b 100644 --- a/src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs +++ b/src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs @@ -213,6 +213,10 @@ private AsyncCompletionData.CommitBehavior Commit( { view.TryMoveCaretToAndEnsureVisible(new SnapshotPoint(subjectBuffer.CurrentSnapshot, mappedSpan.Start.Position + adjustedNewText.Length)); } + else + { + view.Caret.EnsureVisible(); + } } includesCommitCharacter = change.IncludesCommitCharacter; diff --git a/src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs b/src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs index a7ab157fe67d3..a7381e5da74c8 100644 --- a/src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs +++ b/src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs @@ -332,7 +332,7 @@ int P { get { $$} } assertCaretPosition: true); } - [ConditionalWpfFact(typeof(LegacyCompletionCondition)), Trait(Traits.Feature, Traits.Features.Completion)] + [WpfFact, Trait(Traits.Feature, Traits.Features.Completion)] [WorkItem(33822, "https://github.com/dotnet/roslyn/issues/33822")] public void EnsureTheCaretIsVisibleAfterALongEdit() {