提交 17501617 编写于 作者: H Heejae Chang

Merge pull request #8543 from heejaechang/preventcrash

fix crash.
......@@ -52,7 +52,8 @@ public VisualStudioVenusSpanMappingService(VisualStudioWorkspaceImpl workspace)
var textLines = location.SourceTree.GetText().Lines;
var startPos = textLines.GetPosition(originalSpan.Start);
var endPos = textLines.GetPosition(originalSpan.End);
sourceSpan = new TextSpan(startPos, endPos - startPos);
sourceSpan = TextSpan.FromBounds(startPos, Math.Max(startPos, endPos));
}
if (mappedSpan.Start != mappedLineInfo.StartLinePosition || mappedSpan.End != mappedLineInfo.EndLinePosition)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册