make sure ensureLowerCaseVariants has been called

This commit is contained in:
Johannes Rieken
2018-10-02 21:04:47 +02:00
parent 63d6fcf8f3
commit 0fb324496a

View File

@@ -225,16 +225,16 @@ export class CompletionModel {
// if it matches we check with the label to compute highlights
// and if that doesn't yield a result we have no highlights,
// despite having the match
let match = scoreFn(word, wordLow, wordPos, suggestion.filterText, typeof suggestion._filterTextLow === 'undefined' && suggestion.filterText ? suggestion.filterText.toLowerCase() : suggestion._filterTextLow, 0, false);
let match = scoreFn(word, wordLow, wordPos, suggestion.filterText, suggestion._filterTextLow, 0, false);
if (!match) {
continue;
}
item.score = match[0];
item.matches = (fuzzyScore(word, wordLow, 0, suggestion.label, typeof suggestion._labelLow === 'undefined' ? suggestion.label.toLowerCase() : suggestion._labelLow, 0, true) || anyScore(word, suggestion.label))[1];
item.matches = (fuzzyScore(word, wordLow, 0, suggestion.label, suggestion._labelLow, 0, true) || anyScore(word, suggestion.label))[1];
} else {
// by default match `word` against the `label`
let match = scoreFn(word, wordLow, wordPos, suggestion.label, typeof suggestion._labelLow === 'undefined' ? suggestion.label.toLowerCase() : suggestion._labelLow, 0, false);
let match = scoreFn(word, wordLow, wordPos, suggestion.label, suggestion._labelLow, 0, false);
if (match) {
item.score = match[0];
item.matches = match[1];