Skip to content

Commit 68db1a0

Browse files
authored
Merge pull request #33827 from sharwell/caret-visible
Ensure the caret is visible after commit
2 parents 516a25d + 1813a33 commit 68db1a0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs

+4
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ private AsyncCompletionData.CommitBehavior Commit(
213213
{
214214
view.TryMoveCaretToAndEnsureVisible(new SnapshotPoint(subjectBuffer.CurrentSnapshot, mappedSpan.Start.Position + adjustedNewText.Length));
215215
}
216+
else
217+
{
218+
view.Caret.EnsureVisible();
219+
}
216220
}
217221

218222
includesCommitCharacter = change.IncludesCommitCharacter;

src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ int P { get { $$} }
331331
assertCaretPosition: true);
332332
}
333333

334-
[ConditionalWpfFact(typeof(LegacyCompletionCondition)), Trait(Traits.Feature, Traits.Features.Completion)]
334+
[WpfFact, Trait(Traits.Feature, Traits.Features.Completion)]
335335
[WorkItem(33822, "https://github.com/dotnet/roslyn/issues/33822")]
336336
public void EnsureTheCaretIsVisibleAfterALongEdit()
337337
{

0 commit comments

Comments
 (0)