mirror of
https://github.com/coder/code-server.git
synced 2026-05-09 22:07:26 +02:00
chore(vscode): update to 1.55.2
This commit is contained in:
@@ -174,8 +174,6 @@ export class CompletionModel {
|
||||
wordLow = word.toLowerCase();
|
||||
}
|
||||
|
||||
const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name;
|
||||
|
||||
// remember the word against which this item was
|
||||
// scored
|
||||
item.word = word;
|
||||
@@ -215,19 +213,19 @@ export class CompletionModel {
|
||||
if (!match) {
|
||||
continue; // NO match
|
||||
}
|
||||
if (compareIgnoreCase(item.completion.filterText, textLabel) === 0) {
|
||||
if (compareIgnoreCase(item.completion.filterText, item.textLabel) === 0) {
|
||||
// filterText and label are actually the same -> use good highlights
|
||||
item.score = match;
|
||||
} else {
|
||||
// re-run the scorer on the label in the hope of a result BUT use the rank
|
||||
// of the filterText-match
|
||||
item.score = anyScore(word, wordLow, wordPos, textLabel, item.labelLow, 0);
|
||||
item.score = anyScore(word, wordLow, wordPos, item.textLabel, item.labelLow, 0);
|
||||
item.score[0] = match[0]; // use score from filterText
|
||||
}
|
||||
|
||||
} else {
|
||||
// by default match `word` against the `label`
|
||||
let match = scoreFn(word, wordLow, wordPos, textLabel, item.labelLow, 0, false);
|
||||
let match = scoreFn(word, wordLow, wordPos, item.textLabel, item.labelLow, 0, false);
|
||||
if (!match) {
|
||||
continue; // NO match
|
||||
}
|
||||
@@ -240,7 +238,7 @@ export class CompletionModel {
|
||||
target.push(item as StrictCompletionItem);
|
||||
|
||||
// update stats
|
||||
labelLengths.push(textLabel.length);
|
||||
labelLengths.push(item.textLabel.length);
|
||||
}
|
||||
|
||||
this._filteredItems = target.sort(this._snippetCompareFn);
|
||||
|
||||
Reference in New Issue
Block a user