提交 d25f0125 编写于 作者: C CyrusNajmabadi

Fix base.

上级 da636349
......@@ -39,10 +39,7 @@ public VisualStudioDefinitionsAndReferencesFactory(SVsServiceProvider servicePro
return null;
}
// Add one to the line/column so they are in 1-based coordinates for the UI.
// But keep them 0 based in the ExternalDefinitionLocation so that navigation
// works properly.
var displayParts = GetDisplayParts(filePath, lineNumber + 1, charOffset + 1);
var displayParts = GetDisplayParts(filePath, lineNumber, charOffset);
var definitionLocation = new ExternalDefinitionLocation(
_serviceProvider, filePath, lineNumber, charOffset);
......@@ -59,7 +56,9 @@ public VisualStudioDefinitionsAndReferencesFactory(SVsServiceProvider servicePro
var builder = ImmutableArray.CreateBuilder<TaggedText>();
var sourceLine = GetSourceLine(filePath, lineNumber).Trim(' ', '\t');
var formatted = $"{filePath} - ({lineNumber}, {charOffset}) : {sourceLine}";
// Put the line in 1-based for the presentation of this item.
var formatted = $"{filePath} - ({lineNumber + 1}, {charOffset + 1}) : {sourceLine}";
return ImmutableArray.Create(new TaggedText(TextTags.Text, formatted));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册