Skip to content

Commit

Permalink
Ensure the caret is visible after commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Mar 3, 2019
1 parent 2cab0d7 commit 1813a33
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 @@ internal CommitManager(ITextView textView, RecentItemsManager recentItemsManager
{
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 @@ -332,7 +332,7 @@ class Class1
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 1813a33

Please sign in to comment.