提交 52d2b9fd 编写于 作者: B Benjamin Pasero

quickPick ranking gives priority to class name then to file (fixes #1377)

上级 3db22b03
......@@ -66,21 +66,21 @@ export function score(target: string, query: string, cache?: {[id: string]: numb
score += 1;
}
// Upper Case Bonus
if (isUpper(target.charCodeAt(indexOf))) {
score += 1;
}
// Prefix Bonus
if (indexOf === 0) {
score += 8;
}
// Start of Word/Path Bonous
if (wordPathBoundary.some(w => w === target[indexOf - 1])) {
else if (wordPathBoundary.some(w => w === target[indexOf - 1])) {
score += 7;
}
// Inside Word Upper Case Bonus
else if (isUpper(target.charCodeAt(indexOf))) {
score += 1;
}
index++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册