Skip to content

Commit

Permalink
Merge pull request #33827 from sharwell/caret-visible
Browse files Browse the repository at this point in the history
Ensure the caret is visible after commit
  • Loading branch information
sharwell authored Mar 8, 2019
2 parents 516a25d + 1813a33 commit 68db1a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,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()
{
Expand Down

0 comments on commit 68db1a0

Please sign in to comment.