Revert "commands - shortest match wins"

This reverts commit be3e2a6d25.
This commit is contained in:
Benjamin Pasero 2017-05-01 09:32:39 +02:00
parent e5979644f4
commit 4188e91d5f

View file

@ -285,12 +285,8 @@ export class CommandsHandler extends QuickOpenHandler {
// Remove duplicates
entries = arrays.distinct(entries, (entry) => entry.getLabel() + entry.getGroupLabel());
// Sorting
if (!searchValue) {
entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase()));
} else {
entries = entries.sort((elementA, elementB) => elementA.getLabel().length - elementB.getLabel().length);
}
// Sort by name
entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase()));
return TPromise.as(new QuickOpenModel(entries));
}