未验证 提交 157b30ea 编写于 作者: R Rikki Gibson 提交者: GitHub

Merge pull request #38901 from dotnet/merges/release/dev16.4-preview1-to-master

Merge release/dev16.4-preview1 to master
......@@ -239,22 +239,7 @@ private int CompareMatches(PatternMatch match1, PatternMatch match2, CompletionI
// If they both seemed just as good, but they differ on preselection, then
// item1 is better if it is preselected, otherwise it is worse.
private int ComparePreselection(CompletionItem item1, CompletionItem item2)
{
// If they both seemed just as good, but they differ on preselection, then
// item1 is better if it is preselected, otherwise it is worse.
if (item1.Rules.MatchPriority == MatchPriority.Preselect &&
item2.Rules.MatchPriority != MatchPriority.Preselect)
{
return -1;
}
else if (item1.Rules.MatchPriority != MatchPriority.Preselect &&
item2.Rules.MatchPriority == MatchPriority.Preselect)
{
return 1;
}
return 0;
}
=> (item1.Rules.MatchPriority != MatchPriority.Preselect).CompareTo(item2.Rules.MatchPriority != MatchPriority.Preselect);
private static int CompareExpandedItem(CompletionItem item1, PatternMatch match1, CompletionItem item2, PatternMatch match2)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册