提交 2d6f22bd 编写于 作者: C CyrusNajmabadi

Properly set caret position in debugger intellisense scenarios.

上级 ce48bcdd
......@@ -130,8 +130,9 @@ private CompletionProvider GetCompletionProvider(CompletionItem item)
}
// Now, move the caret to the right location.
TextView.Caret.MoveTo(
new SnapshotPoint(this.SubjectBuffer.CurrentSnapshot, desiredCaretPosition));
var graph = new DisconnectedBufferGraph(this.SubjectBuffer, this.TextView.TextBuffer);
var viewTextSpan = graph.GetSubjectBufferTextSpanInViewBuffer(new TextSpan(desiredCaretPosition, 0));
TextView.Caret.MoveTo(new SnapshotPoint(TextView.TextBuffer.CurrentSnapshot, viewTextSpan.TextSpan.Start));
// Now, pass along the commit character unless the completion item said not to
if (characterWasSentIntoBuffer && !completionChange.IncludesCommitCharacter)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册