mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 09:08:46 +00:00
Revert "commands - shortest match wins"
This reverts commit be3e2a6d25
.
This commit is contained in:
parent
e5979644f4
commit
4188e91d5f
1 changed files with 2 additions and 6 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue