提交 7bc046f6 编写于 作者: J Joao Moreno

remove bogus sorting

上级 ef27dc79
...@@ -39,17 +39,13 @@ function completionGroupCompare(one: CompletionGroup, other: CompletionGroup): n ...@@ -39,17 +39,13 @@ function completionGroupCompare(one: CompletionGroup, other: CompletionGroup): n
function completionItemCompare(item: CompletionItem, otherItem: CompletionItem): number { function completionItemCompare(item: CompletionItem, otherItem: CompletionItem): number {
const suggestion = item.suggestion; const suggestion = item.suggestion;
const otherSuggestion = otherItem.suggestion; const otherSuggestion = otherItem.suggestion;
let result = 0;
if (typeof suggestion.sortText === 'string' && typeof otherSuggestion.sortText === 'string') { // TODO@jrieken
result = suggestion.sortText < otherSuggestion.sortText ? -1 : 1; // if (typeof suggestion.sortText === 'string' && typeof otherSuggestion.sortText === 'string') {
} // return suggestion.sortText < otherSuggestion.sortText ? -1 : 1;
// }
if (result !== 0) {
return result;
}
return suggestion.label < otherSuggestion.label ? -1 : 1; return suggestion.label.toLowerCase() < otherSuggestion.label.toLowerCase() ? -1 : 1;
} }
class CompletionItem { class CompletionItem {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册