Skip to content

Commit

Permalink
actually call the compareByKindAndRank-function
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Sep 9, 2019
1 parent e45341c commit 09f125d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/vs/workbench/contrib/quickopen/browser/gotoSymbolHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ class OutlineModel extends QuickOpenModel {
}
});

this.entries.sort(SymbolEntry.compareByRank);


// select comparator based on the presence of the colon-prefix
this.entries.sort(searchValuePos === 0
? SymbolEntry.compareByRank
: SymbolEntry.compareByKindAndRank
);

// Mark all type groups
const visibleResults = <SymbolEntry[]>this.getEntries(true);
Expand Down Expand Up @@ -297,7 +299,7 @@ class SymbolEntry extends EditorQuickOpenEntryGroup {
const kindB = NLS_SYMBOL_KIND_CACHE[b.getKind()] || FALLBACK_NLS_SYMBOL_KIND;
let r = kindA.localeCompare(kindB);
if (r === 0) {
r = this.compareByRank(a, b);
r = SymbolEntry.compareByRank(a, b);
}
return r;
}
Expand Down

0 comments on commit 09f125d

Please sign in to comment.