提交 dab6e14f 编写于 作者: C CyrusNajmabadi 提交者: GitHub

Merge pull request #15384 from dotnet/navigateToSpan

Navigate to a span, not a position.
......@@ -42,7 +42,7 @@ public bool CanNavigateTo()
{
var workspace = Document.Project.Solution.Workspace;
var service = workspace.Services.GetService<IDocumentNavigationService>();
return service.CanNavigateToPosition(workspace, Document.Id, SourceSpan.Start);
return service.CanNavigateToSpan(workspace, Document.Id, SourceSpan);
}
public bool TryNavigateTo()
......@@ -50,7 +50,7 @@ public bool TryNavigateTo()
var solution = Document.Project.Solution;
var workspace = solution.Workspace;
var service = workspace.Services.GetService<IDocumentNavigationService>();
return service.TryNavigateToPosition(workspace, Document.Id, SourceSpan.Start,
return service.TryNavigateToSpan(workspace, Document.Id, SourceSpan,
options: solution.Options.WithChangedOption(NavigationOptions.PreferProvisionalTab, true));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册