mirror of
https://github.com/Codiad/Codiad.git
synced 2026-03-14 21:16:55 +01:00
Try without distance score.
This commit is contained in:
@@ -44,10 +44,10 @@
|
||||
var _this = this;
|
||||
|
||||
/* If the autocomplete popup is already in use, hide it. */
|
||||
if (this.isVisible) {
|
||||
alert('already open');
|
||||
this.hide();
|
||||
}
|
||||
// if (this.isVisible) {
|
||||
// alert('already open');
|
||||
// this.hide();
|
||||
// }
|
||||
|
||||
this.addListenerToOnDocumentChange();
|
||||
|
||||
@@ -388,8 +388,9 @@
|
||||
var suggestionsAndFinalScore = {};
|
||||
for (suggestion in suggestionsAndMatchScore) {
|
||||
if (suggestionsAndMatchScore.hasOwnProperty(suggestion)) {
|
||||
suggestionsAndFinalScore[suggestion] = suggestionsAndMatchScore[suggestion] -
|
||||
suggestionsAndDistance[suggestion];
|
||||
// suggestionsAndFinalScore[suggestion] = suggestionsAndMatchScore[suggestion] -
|
||||
// suggestionsAndDistance[suggestion];
|
||||
suggestionsAndFinalScore[suggestion] = suggestionsAndMatchScore[suggestion];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +404,8 @@
|
||||
}
|
||||
|
||||
suggestions.sort(function (firstSuggestion, secondSuggestion) {
|
||||
return suggestionsAndFinalScore[firstSuggestion] - suggestionsAndFinalScore[secondSuggestion];
|
||||
// return suggestionsAndFinalScore[firstSuggestion] - suggestionsAndFinalScore[secondSuggestion];
|
||||
return suggestionsAndFinalScore[secondSuggestion] - suggestionsAndFinalScore[firstSuggestion];
|
||||
});
|
||||
|
||||
return suggestions;
|
||||
|
||||
Reference in New Issue
Block a user